Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveLink Component #61

Closed
agubler opened this issue Aug 12, 2018 · 0 comments
Closed

ActiveLink Component #61

agubler opened this issue Aug 12, 2018 · 0 comments
Labels
enhancement New feature or request next Issue/Pull Request for the next major version

Comments

@agubler
Copy link
Member

agubler commented Aug 12, 2018

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
    ]);
}
@agubler agubler added enhancement New feature or request next Issue/Pull Request for the next major version labels Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next Issue/Pull Request for the next major version
Projects
None yet
Development

No branches or pull requests

1 participant