-
Notifications
You must be signed in to change notification settings - Fork 610
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
New Admin UI - Grid
/ Col
Components
#4252
base: feat/new-admin-ui
Are you sure you want to change the base?
Conversation
Cypress E2E tests have been initiated (for more information, click here). ✨ |
Couple of comments...
|
Re number 2... I would've already done it... but I'm actually having some trouble with the API design and the underlying implementation. I've seen that some libs have the following approach when it comes to responsive grids: // 12 columns for all screen sizes.
<Grid columns={12}>...</Grid>
// Use 12 columns for all sizes, except small screens, where we use 1.
<Grid columns={{ initial: 12, sm: 1 }}>...</Grid> But now.... the only thing that then becomes a bit complicated here is class generation with
Looks to me we'd need to handle the above Maybe we need a different API here? 🤔 Or maybe we don't even need the Grid component at all, but we use it just for old Admin UI? And we simply use TW classes directly? Not sure all in all. |
Grid
/ Col
Components
BTW some other items I have on the list are...
|
This PR introduces the Grid / Cell components.
Other Changes
1. Elevation Fix
Found an issue with the
Elevation
component (not able to receive custom CSS class). Resolved now.2. Switch Fix
Noticed a TS issue related to the Switch component. Applied this fix.
3.
svg
HTML Element Displayed As BlockThis is not a change, but a discovery. I've discovered Tailwind's preflight makes all
svg
HTML tags display as blocks by default. Which previously was not the case, and now, for example, in the dashboard, you can noticed icons in the bottom-right being aligned to the left, and not to center. For now did not do anything, just wrote it down in GH project as a reminder.4.
withStaticProps
UtilityAdded this utility to easily add static props to React components. This helps in situations where you have a for example
Grid
component, and you also want to haveGrid.Column
. The same was used with the Avatar component.