Skip to content

ActiveLink Component #61

@agubler

Description

@agubler

Enhancement

An ActiveLink component that applies one of more classes when the target outlet is matched in the current route.

render() {
    return v('div', [
        w(ActiveLink, { 
            to: 'foo', 
            activeClasses: [ 'fooActive' ] 
        }, [ 'Label' ]), // applies class when `foo` outlet is matched
        w(ActiveLink, { 
            to: 'bar', 
            activeClasses: [ 'barActive' ] 
        }, [ 'Label' ])  // applies class when `bar` outlet is matched
    ]);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnextIssue/Pull Request for the next major version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions