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

[docs][base] Add Tailwind CSS + plain CSS demo on the Select page #37725

Merged

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Jun 26, 2023

@mnajdova mnajdova added docs Improvements or additions to the documentation component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Jun 26, 2023
@mui-bot
Copy link

mui-bot commented Jun 26, 2023

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 5c287c0

@mnajdova mnajdova marked this pull request as ready for review June 26, 2023 10:21
@zanivan
Copy link
Contributor

zanivan commented Jun 26, 2023

I made a slight tweak to the Tailwind demo background by using slate-800 instead of 900—This will give it a lighter tone, aligning it more closely with the plain CSS and System demos.

Also, for some reason the Tailwind demo has a very strong border on the listbox and I couldn't find why. The border width with 1px would be perfect—On tailwind this should be the default size just by using border

Screenshot 2023-06-26 at 18 32 14

@michaldudak
Copy link
Member

Is it intended for the Tailwind demo to have a different font on the combobox?

@mnajdova
Copy link
Member Author

Is it intended for the Tailwind demo to have a different font on the combobox?

We decided to not use the same font as the other demos (system and plain CSS) on the first pull request. Happy to revisit the subject. cc @danilo-leal

@mnajdova
Copy link
Member Author

Also, for some reason the Tailwind demo has a very strong border on the listbox and I couldn't find why. The border width with 1px would be perfect—On tailwind this should be the default size just by using border

I fixed it, looks better now.

Copy link
Contributor

@zanivan zanivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the adjustments @mnajdova it looks good!
I've added a few more tweaks on dark mode just to increase the contrast and be a bit more visually consistent overall, but I think we're good to go!

@michaldudak michaldudak merged commit 9a13253 into mui:master Jul 3, 2023
18 checks passed
const isDarkMode = useIsDarkMode();

return (
<style>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaldudak How do you write <style> tag as a React Component?
I've tried this but occurring error that doesn't allow <style> tag as JSX.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to write style's contents as a string:

<style>
  {`div {
    color: red;
  }`}
</style>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants