We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
I'm trying to style active menu items and running into an issue with Styled.a vs Link in gatsby.
Styled.a
Link
const MenuItem = props => { return <Styled.a as={Link} sx={{ variant: 'text.menu' }} {...props} activeClassName='active' /> }
returns a link tag with aria-current="page" and no active class. I've tried styling using
aria-current="page"
'[aria-current]:not([aria-current="false"])': { color: '#fff', },
but that's not working...
The following works but doesn't allow for using the Styled.a pattern which is sooo nice.
const MenuItemOld = props => { return <Link sx={{ variant: 'text.menu' }} {...props} activeClassName='active' /> }
The text was updated successfully, but these errors were encountered:
Hmm. <Styled.a as={Link} activeClassName='active' /> should work so this might be a bug. Does the active class name not render at all?
<Styled.a as={Link} activeClassName='active' />
active
Sorry, something went wrong.
Correct. no active class is rendered.
Successfully merging a pull request may close this issue.
I'm trying to style active menu items and running into an issue with
Styled.a
vsLink
in gatsby.returns a link tag with
aria-current="page"
and no active class. I've tried styling usingbut that's not working...
The following works but doesn't allow for using the
Styled.a
pattern which is sooo nice.The text was updated successfully, but these errors were encountered: