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 demos on the Input page #37685

Merged
merged 6 commits into from
Jun 26, 2023

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Jun 23, 2023

I added a custom box-shadow value in the theme for the outline - it's used in more components, so I believe it makes sense.

Preview: https://deploy-preview-37685--material-ui.netlify.app/base-ui/react-input/#basics

Part of #37222

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

mui-bot commented Jun 23, 2023

Netlify deploy preview

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against 57cc718

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

zanivan commented Jun 23, 2023

Submitted a PR for this on #37688

@mnajdova I've just tweaked the border color and the shadow a bit on the tailwind demo.

Regardless, I think I found a bug while reviewing the PR, and I don't know if it could be fixed here or in a separate PR—I'm not sure if it's only happening here as well:

When in mobile, the screen has a horizontal scroll due to the width of the Customization/Adornments demo:

Screenshot 2023-06-23 at 10 57 20

@zanivan
Copy link
Contributor

zanivan commented Jun 23, 2023

One more thing, as I was reviewing it on mobile, I noticed that the demo container and its toolbar are not displayed, and therefore, the style selector is missing as well.

Overall, I think it makes sense, but perhaps for Base UI we should have a way to switch demo styles, considering it's one of the major advantages of using it. What are your thoughts, @danilo-leal @mnajdova?

@danilo-leal
Copy link
Contributor

Uhm, good point about the styling menu not being shown on mobile. The demo toolbar was already not displayed but it might make sense to at least have the option to toggle the styles 🤔 We can think about that in parallel (not within the scope of this PR).

theme: {
extend: {
boxShadow: {
'outline-purple': '0 0 0 3px #c084fc',
Copy link
Member Author

Choose a reason for hiding this comment

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

@danilo-leal @zanivan I noticed that we use different strategy for the outlined shadow, for e.g. here we use boxShadow, while in the select we use outline. Should we normalize this?

Copy link
Contributor

Choose a reason for hiding this comment

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

For sure, yes! It seems box-shadow is a safer approach, right (due to outlines not following border radii on Safari)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, I followed this in the select PR.

@mnajdova
Copy link
Member Author

@zanivan @danilo-leal is there something else worth addressing here? We'll need to merge this one before the select, as it uses the same extended theme for the focus visible outline :)

@mnajdova mnajdova changed the title [docs][base] Add Tailwind CSS & plain CSS demos for the Input component [docs][base] Add Tailwind CSS & plain CSS demos on the Input page Jun 26, 2023
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.

It looks good to me!

@mnajdova mnajdova merged commit ddaed57 into mui:master Jun 26, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: input 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

4 participants