Skip to content

Commit

Permalink
[docs] Sync <Stack> between projects (#36785)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 14, 2023
1 parent a0c1b25 commit 0046053
Show file tree
Hide file tree
Showing 69 changed files with 594 additions and 333 deletions.
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/AutoGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function AutoGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/AutoGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function AutoGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/BasicGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function BasicGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/BasicGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function BasicGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/CSSGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Box from '@mui/joy/Box';
import Sheet from '@mui/joy/Sheet';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function CSSGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/CSSGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Box from '@mui/joy/Box';
import Sheet from '@mui/joy/Sheet';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function CSSGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/ColumnsGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function ColumnsGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/ColumnsGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function ColumnsGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/FullWidthGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function FullWidthGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/FullWidthGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function FullWidthGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/ResponsiveGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function ResponsiveGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/ResponsiveGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function ResponsiveGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/RowAndColumnSpacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Grid from '@mui/joy/Grid';
import Sheet from '@mui/joy/Sheet';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function RowAndColumnSpacing() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/RowAndColumnSpacing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Grid from '@mui/joy/Grid';
import Sheet from '@mui/joy/Sheet';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function RowAndColumnSpacing() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/VariableWidthGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function VariableWidthGrid() {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/joy/components/grid/VariableWidthGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import Sheet from '@mui/joy/Sheet';
import Grid from '@mui/joy/Grid';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function VariableWidthGrid() {
Expand Down
18 changes: 12 additions & 6 deletions docs/data/joy/components/stack/BasicStack.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import * as React from 'react';
import Sheet from '@mui/joy/Sheet';
import Stack from '@mui/joy/Stack';
import Box from '@mui/joy/Box';
import { styled } from '@mui/joy/styles';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function BasicStack() {
return (
<Stack spacing={2} sx={{ width: '100%' }}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
<Box sx={{ width: '100%' }}>
<Stack spacing={2}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
</Box>
);
}
18 changes: 12 additions & 6 deletions docs/data/joy/components/stack/BasicStack.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import * as React from 'react';
import Sheet from '@mui/joy/Sheet';
import Stack from '@mui/joy/Stack';
import Box from '@mui/joy/Box';
import { styled } from '@mui/joy/styles';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function BasicStack() {
return (
<Stack spacing={2} sx={{ width: '100%' }}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
<Box sx={{ width: '100%' }}>
<Stack spacing={2}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
</Box>
);
}
8 changes: 5 additions & 3 deletions docs/data/joy/components/stack/BasicStack.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
<Stack spacing={2}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
22 changes: 11 additions & 11 deletions docs/data/joy/components/stack/DirectionStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ import Stack from '@mui/joy/Stack';
import { styled } from '@mui/joy/styles';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function DirectionStack() {
return (
<Stack
direction="row"
spacing={2}
justifyContent="center"
sx={{ width: '100%' }}
>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
<div>
<Stack direction="row" spacing={2}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
</div>
);
}
22 changes: 11 additions & 11 deletions docs/data/joy/components/stack/DirectionStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ import Stack from '@mui/joy/Stack';
import { styled } from '@mui/joy/styles';

const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
...theme.typography.body2,
padding: theme.spacing(1),
textAlign: 'center',
color: theme.vars.palette.text.tertiary,
borderRadius: 4,
color: theme.vars.palette.text.secondary,
}));

export default function DirectionStack() {
return (
<Stack
direction="row"
spacing={2}
justifyContent="center"
sx={{ width: '100%' }}
>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
<div>
<Stack direction="row" spacing={2}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
</div>
);
}
8 changes: 5 additions & 3 deletions docs/data/joy/components/stack/DirectionStack.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
<Stack direction="row" spacing={2}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack>
Loading

0 comments on commit 0046053

Please sign in to comment.