-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[material-ui] Export Pigment CSS layout components (#42693)
- Loading branch information
1 parent
a3f7645
commit 20565ce
Showing
43 changed files
with
1,707 additions
and
130 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
26 changes: 26 additions & 0 deletions
26
apps/pigment-css-next-app/src/app/material-ui/react-container/page.tsx
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,26 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import Container from '@mui/material/PigmentContainer'; | ||
|
||
export default function ContainerPage() { | ||
return ( | ||
<React.Fragment> | ||
<section> | ||
<h2> Fixed Container</h2> | ||
<div className="demo-container"> | ||
<Container fixed> | ||
<Box sx={{ bgcolor: '#cfe8fc', height: '30vh' }} /> | ||
</Container> | ||
</div> | ||
</section> | ||
<section> | ||
<h2> Simple Container</h2> | ||
<div className="demo-container"> | ||
<Container maxWidth="sm"> | ||
<Box sx={{ bgcolor: '#cfe8fc', height: '30vh' }} /> | ||
</Container> | ||
</div> | ||
</section> | ||
</React.Fragment> | ||
); | ||
} |
73 changes: 73 additions & 0 deletions
73
apps/pigment-css-next-app/src/app/material-ui/react-grid/page.tsx
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,73 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import Paper from '@mui/material/Paper'; | ||
import Grid from '@mui/material/PigmentGrid'; | ||
import { styled } from '@pigment-css/react'; | ||
|
||
const Item = styled(Paper)(({ theme }) => ({ | ||
backgroundColor: '#fff', | ||
...theme.typography.body2, | ||
padding: theme.spacing(1), | ||
textAlign: 'center', | ||
color: theme.palette.text.secondary, | ||
...theme.applyStyles('dark', { | ||
backgroundColor: '#1A2027', | ||
}), | ||
})); | ||
|
||
export default function GridPage() { | ||
return ( | ||
<React.Fragment> | ||
<section> | ||
<h2> Basic Grid</h2> | ||
<div className="demo-container"> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<Grid container spacing={2}> | ||
<Grid size={{ xs: 8 }}> | ||
<Item>xs=8</Item> | ||
</Grid> | ||
<Grid size={{ xs: 4 }}> | ||
<Item>xs=4</Item> | ||
</Grid> | ||
<Grid size={{ xs: 4 }}> | ||
<Item>xs=4</Item> | ||
</Grid> | ||
<Grid size={{ xs: 8 }}> | ||
<Item>xs=8</Item> | ||
</Grid> | ||
</Grid> | ||
</Box> | ||
</div> | ||
</section> | ||
<section> | ||
<h2> Columns Grid</h2> | ||
<div className="demo-container"> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<Grid container spacing={2} columns={16}> | ||
<Grid size={{ xs: 8 }}> | ||
<Item>xs=8</Item> | ||
</Grid> | ||
<Grid size={{ xs: 8 }}> | ||
<Item>xs=8</Item> | ||
</Grid> | ||
</Grid> | ||
</Box> | ||
</div> | ||
</section> | ||
<section> | ||
<h2> Responsive Grid</h2> | ||
<div className="demo-container"> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<Grid container spacing={{ xs: 2, md: 3 }} columns={{ xs: 4, sm: 8, md: 12 }}> | ||
{Array.from(Array(6)).map((_, index) => ( | ||
<Grid size={{ xs: 2, sm: 4, md: 4, lg: 3 }} key={index}> | ||
<Item>xs=2</Item> | ||
</Grid> | ||
))} | ||
</Grid> | ||
</Box> | ||
</div> | ||
</section> | ||
</React.Fragment> | ||
); | ||
} |
53 changes: 53 additions & 0 deletions
53
apps/pigment-css-next-app/src/app/material-ui/react-stack/page.tsx
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,53 @@ | ||
import * as React from 'react'; | ||
import Divider from '@mui/material/Divider'; | ||
import Paper from '@mui/material/Paper'; | ||
import Stack from '@mui/material/PigmentStack'; | ||
import { styled } from '@pigment-css/react'; | ||
|
||
const Item = styled(Paper)(({ theme }) => ({ | ||
backgroundColor: '#fff', | ||
...theme.typography.body2, | ||
padding: theme.spacing(1), | ||
textAlign: 'center', | ||
color: theme.palette.text.secondary, | ||
...theme.applyStyles('dark', { | ||
backgroundColor: '#1A2027', | ||
}), | ||
})); | ||
|
||
export default function StackPage() { | ||
return ( | ||
<React.Fragment> | ||
<section> | ||
<h2> Basic Stack</h2> | ||
<div className="demo-container"> | ||
<Stack spacing={2}> | ||
<Item>Item 1</Item> | ||
<Item>Item 2</Item> | ||
<Item>Item 3</Item> | ||
</Stack> | ||
</div> | ||
</section> | ||
<section> | ||
<h2> Divider Stack</h2> | ||
<div className="demo-container"> | ||
<Stack direction="row" divider={<Divider orientation="vertical" flexItem />} spacing={2}> | ||
<Item>Item 1</Item> | ||
<Item>Item 2</Item> | ||
<Item>Item 3</Item> | ||
</Stack> | ||
</div> | ||
</section> | ||
<section> | ||
<h2> Responsive Stack</h2> | ||
<div className="demo-container"> | ||
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={{ xs: 1, sm: 2, md: 4 }}> | ||
<Item>Item 1</Item> | ||
<Item>Item 2</Item> | ||
<Item>Item 3</Item> | ||
</Stack> | ||
</div> | ||
</section> | ||
</React.Fragment> | ||
); | ||
} |
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
Oops, something went wrong.