-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Component/language drop down #5982
Component/language drop down #5982
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Yes, it does. I've set the max-height and here's what it looks like. In Firefox In Chrome
NOTE: The scrollbar width will be included in the width of the container. |
I think that is done with color-scheme. Not sure if Storybook is respecting that yet; But we also haven't configured it yet I supposed (on our base-styles) (We might want to add |
I am trying this but it's not working. The media query for |
Don't worry about that. That is a Storybook-specific issue. That happens because Storybook itself, sets itself (its own theme) to what matches your system, so it actually overrides whatever we set as color-scheme. We might be able to disable that on Storybook and I can investigate that, but for now. Don't worry about it not working on your Storybook. You can check the behaviour, if you inspect the iframe HTML element and remove the "color-scheme" that Storybook injects. |
I am using the |
Can you show how are you using it? |
Using [data-theme='dark'] .dropDownContent {
--language-drop-scrollbar-bg: theme('colors.neutral.900');
--language-drop-scrollthumb-bg: theme('colors.neutral.800');
}
[data-theme='dark'] .scrollbar {
scrollbar-color: var(--language-drop-scrollthumb-bg)
var(--language-drop-scrollbar-bg);
} |
Why are you trying to manually style the scrollbar? |
@Rounak-stha can you rebase your PR? 👀 |
- Proper Component Name - Use Predefined Tailwind Class - Pass Handler as Prop
70319ba
to
a0152fd
Compare
Hey, just did the rebase. 🤞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else besides of those two minor things look ok :)
@ovflowd what do you think of wrapping the button in https://www.radix-ui.com/primitives/docs/utilities/accessible-icon ? I noticed this utility just now when creating the |
Shouldn't the Icon be wrapped? Not the button? Or whatÄs the difference? |
- Replace Tabs with Spaces - Use Tailwind Default Class for Dropdown Content
Isn't the dropdown trigger button already accessible? |
Yeah, I think so... @bmuenzenmeyer? |
Keyboard, sure. It mentions screen reader a11y too. I can test if my copy of JAWS still works. We can consider this non-blocking for this PR and I will look to address globally in another issue. |
Description
This PR creates
LanguageDropDown
component. The figma design is followed and the component is tested visually.This PR also removes the leftover files from the previus design as mentioned in the issue.
Validation
Dark Mode:
Light Mode:
Related Issues
Addresses #5981
Check List
npx turbo lint
to ensure the code follows the style guide. And runnpx turbo lint:fix
to fix the style errors if necessary.npx turbo format
to ensure the code follows the style guide.npx turbo test
to check if all tests are passing.