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

[@mantine/core] Grid: Add column prop #2143

Merged
merged 2 commits into from Aug 17, 2022
Merged

[@mantine/core] Grid: Add column prop #2143

merged 2 commits into from Aug 17, 2022

Conversation

mdodell
Copy link
Contributor

@mdodell mdodell commented Aug 16, 2022

Adds an order prop to the Grid.Col component so that columns can be re-ordered/be ordered based on responsiveness.

function Demo() {
return (
<Grid>
<Col span={3} order={2}>2</Col>
Copy link
Member

Choose a reason for hiding this comment

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

Please add responsive props (let's say orderSm and orderLg to the demo)

Copy link
Contributor Author

@mdodell mdodell Aug 16, 2022

Choose a reason for hiding this comment

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

Sounds good - should I also use the useMediaQuery hook here to relabel the children of Grid.Col based on their new order?

I based this off of the offset docs which didn't have them, so I withheld the responsive props for consistency here.

@rtivital rtivital changed the base branch from master to dev August 16, 2022 21:19
@rtivital rtivital merged commit a8bbc87 into mantinedev:dev Aug 17, 2022
@rtivital
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants