Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@mantine/core] Grid: Add order prop support to Gird.Col (#2143)
* [@mantine/core] Grid: add order prop to Grid.Col * [@mantine/core] Grid: Added responsive order props to demo
- Loading branch information
Showing
5 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import { Grid } from '@mantine/core'; | ||
import { ColWrapper as Col } from './_col-wrapper'; | ||
|
||
const code = ` | ||
import { Grid } from '@mantine/core'; | ||
function Demo() { | ||
return ( | ||
<Grid> | ||
<Col span={3} order={2} orderSm={1} orderLg={3}>2</Col> | ||
<Col span={3} order={3} orderSm={1} orderLg={2}>3</Col> | ||
<Col span={3} order={1} orderSm={3} orderLg={1}>1</Col> | ||
</Grid> | ||
); | ||
} | ||
`; | ||
|
||
function Demo() { | ||
return ( | ||
<Grid> | ||
<Col span={3} order={2} orderSm={1} orderLg={3}> | ||
2 | ||
</Col> | ||
<Col span={3} order={3} orderSm={1} orderLg={2}> | ||
3 | ||
</Col> | ||
<Col span={3} order={1} orderSm={3} orderLg={1}> | ||
1 | ||
</Col> | ||
</Grid> | ||
); | ||
} | ||
|
||
export const order: MantineDemo = { | ||
type: 'demo', | ||
code, | ||
component: Demo, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters