-
Notifications
You must be signed in to change notification settings - Fork 36
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
Visual bug with DropdownMenu.Trigger and Button when upgrading from 0.50.0 to 0.51.2 #1628
Comments
Hi, this bug is due to css-specificity, which we have an open issue for here.
<DropdownMenu>
<DropdownMenu.Trigger variant="tertiary">
Open menu
</DropdownMenu.Trigger>
<DropdownMenu.Content>
<DropdownMenu.Item href="/about">About</DropdownMenu.Item>
<DropdownMenu.Item href="/contact">Contact</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu> |
Thanks, I'll follow #1456 for updates. In our actual code we need an |
Adding |
Sounds good, I'll do that. I have followed the documentation, which says that I need to use |
Looking at the code for the trigger, if you send an <DropdownMenu>
<DropdownMenu.Trigger variant="tertiary" asChild>
<button onClick={...}>
Open menu
</button>
</DropdownMenu.Trigger>
<DropdownMenu.Content>
<DropdownMenu.Item href="/about">About</DropdownMenu.Item>
<DropdownMenu.Item href="/contact">Contact</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu> Here we don't use Designsystemets |
The documentation says
In my mind, that means that I have to use Adding |
Description of the bug
When upgrading from 0.50.0 to 0.51.2, there is a visual bug with the Button component, when used as a trigger for the Dropdown.Menu. We're using the button variant "tertiary", and in 0.51.2 the background color changes to dark blue.
Steps To Reproduce
npm install
and run app withnpm run dev
.localhost:3000
and see that the button is dark blue.@digdir/design-system-react
to 0.50.0.npm install
andnpm run dev
again.Additional Information
No response
The text was updated successfully, but these errors were encountered: