-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs][base] Add Tailwind CSS + plain CSS demo on the Menu page #38618
Conversation
Netlify deploy previewBundle size report |
@@ -19,7 +19,7 @@ export default function MenuIntroduction() { | |||
<StyledMenuItem onClick={createHandleMenuClick('Profile')}> | |||
Profile | |||
</StyledMenuItem> | |||
<StyledMenuItem onClick={createHandleMenuClick('My account')}> | |||
<StyledMenuItem onClick={createHandleMenuClick('Language settings')}> |
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.
Nice catch! :)
return ( | ||
<div className={`${isDarkMode ? 'dark' : ''}`}> | ||
<Dropdown> | ||
<MenuButton className="cursor-pointer text-sm min-h-[calc(1.5em+22px)] font-sans box-border rounded-xl font-semibold px-3.5 py-2 leading-normal bg-white dark:bg-slate-900 border border-solid border-slate-300 dark:border-slate-700 text-slate-900 dark:text-slate-300 hover:bg-slate-50 hover:dark:bg-slate-800 hover:border-slate-300 dark:hover:border-slate-600 focus-visible:border-purple-500 focus-visible:hover:border-purple-500 focus-visible:dark:hover:border-purple-500 focus-visible:outline-0 focus-visible:shadow-outline-purple"> |
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.
We should create our own version of the MenuButton
and the MenuItem
componetn similar as done with the Menu
. It would simplify a lot the demo code.
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.
Thanks @mnajdova, I just added the custom version of MenuButton
and MenuItem
for both demos. Please let me know if it addresses your comment :)
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.
Looks great, thanks!
Part of #37222