forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core][docs] Restore and revise the Box docs (mui#40622)
- Loading branch information
1 parent
c4bd8a1
commit e143727
Showing
32 changed files
with
401 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
|
||
export default function BoxBasic() { | ||
return ( | ||
<Box component="section" sx={{ p: 2, border: '1px dashed grey' }}> | ||
This Box renders as an HTML section element. | ||
</Box> | ||
); | ||
} |
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,10 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
|
||
export default function BoxBasic() { | ||
return ( | ||
<Box component="section" sx={{ p: 2, border: '1px dashed grey' }}> | ||
This Box renders as an HTML section element. | ||
</Box> | ||
); | ||
} |
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,2 @@ | ||
|
||
This Box renders as an HTML section element. |
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,33 @@ | ||
import * as React from 'react'; | ||
import { Box, ThemeProvider } from '@mui/joy'; | ||
|
||
export default function BoxSx() { | ||
return ( | ||
<ThemeProvider | ||
theme={{ | ||
colorSchemes: { | ||
light: { | ||
palette: { | ||
primary: { | ||
400: '#38bdf8', | ||
700: '#0369a1', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}} | ||
> | ||
<Box | ||
sx={{ | ||
width: 100, | ||
height: 100, | ||
borderRadius: 1, | ||
bgcolor: 'primary.700', | ||
'&:hover': { | ||
bgcolor: 'primary.400', | ||
}, | ||
}} | ||
/> | ||
</ThemeProvider> | ||
); | ||
} |
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,33 @@ | ||
import * as React from 'react'; | ||
import { Box, ThemeProvider } from '@mui/joy'; | ||
|
||
export default function BoxSx() { | ||
return ( | ||
<ThemeProvider | ||
theme={{ | ||
colorSchemes: { | ||
light: { | ||
palette: { | ||
primary: { | ||
400: '#38bdf8', | ||
700: '#0369a1', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}} | ||
> | ||
<Box | ||
sx={{ | ||
width: 100, | ||
height: 100, | ||
borderRadius: 1, | ||
bgcolor: 'primary.700', | ||
'&:hover': { | ||
bgcolor: 'primary.400', | ||
}, | ||
}} | ||
/> | ||
</ThemeProvider> | ||
); | ||
} |
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,19 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
|
||
export default function BoxSystemProps() { | ||
return ( | ||
<Box | ||
height={200} | ||
width={200} | ||
my={4} | ||
display="flex" | ||
alignItems="center" | ||
gap={4} | ||
p={2} | ||
sx={{ border: '2px solid grey' }} | ||
> | ||
This Box uses MUI System props for quick customization. | ||
</Box> | ||
); | ||
} |
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,19 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
|
||
export default function BoxSystemProps() { | ||
return ( | ||
<Box | ||
height={200} | ||
width={200} | ||
my={4} | ||
display="flex" | ||
alignItems="center" | ||
gap={4} | ||
p={2} | ||
sx={{ border: '2px solid grey' }} | ||
> | ||
This Box uses MUI System props for quick customization. | ||
</Box> | ||
); | ||
} |
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,2 @@ | ||
|
||
This Box uses MUI System props for quick customization. |
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,10 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
|
||
export default function BoxBasic() { | ||
return ( | ||
<Box component="section" sx={{ p: 2, border: '1px dashed grey' }}> | ||
This Box renders as an HTML section element. | ||
</Box> | ||
); | ||
} |
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,10 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
|
||
export default function BoxBasic() { | ||
return ( | ||
<Box component="section" sx={{ p: 2, border: '1px dashed grey' }}> | ||
This Box renders as an HTML section element. | ||
</Box> | ||
); | ||
} |
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,2 @@ | ||
|
||
This Box renders as an HTML section element. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,29 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import { Box, ThemeProvider } from '@mui/material'; | ||
|
||
export default function BoxSx() { | ||
return ( | ||
<Box | ||
sx={{ | ||
width: 300, | ||
height: 300, | ||
backgroundColor: 'primary.dark', | ||
'&:hover': { | ||
backgroundColor: 'primary.main', | ||
opacity: [0.9, 0.8, 0.7], | ||
<ThemeProvider | ||
theme={{ | ||
palette: { | ||
primary: { | ||
main: '#007FFF', | ||
dark: '#0066CC', | ||
}, | ||
}, | ||
}} | ||
/> | ||
> | ||
<Box | ||
sx={{ | ||
width: 100, | ||
height: 100, | ||
borderRadius: 1, | ||
bgcolor: 'primary.main', | ||
'&:hover': { | ||
bgcolor: 'primary.dark', | ||
}, | ||
}} | ||
/> | ||
</ThemeProvider> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,18 +1,29 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import { Box, ThemeProvider } from '@mui/material'; | ||
|
||
export default function BoxSx() { | ||
return ( | ||
<Box | ||
sx={{ | ||
width: 300, | ||
height: 300, | ||
backgroundColor: 'primary.dark', | ||
'&:hover': { | ||
backgroundColor: 'primary.main', | ||
opacity: [0.9, 0.8, 0.7], | ||
<ThemeProvider | ||
theme={{ | ||
palette: { | ||
primary: { | ||
main: '#007FFF', | ||
dark: '#0066CC', | ||
}, | ||
}, | ||
}} | ||
/> | ||
> | ||
<Box | ||
sx={{ | ||
width: 100, | ||
height: 100, | ||
borderRadius: 1, | ||
bgcolor: 'primary.main', | ||
'&:hover': { | ||
bgcolor: 'primary.dark', | ||
}, | ||
}} | ||
/> | ||
</ThemeProvider> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
|
||
export default function BoxSystemProps() { | ||
return ( | ||
<Box | ||
height={200} | ||
width={200} | ||
my={4} | ||
display="flex" | ||
alignItems="center" | ||
gap={4} | ||
p={2} | ||
sx={{ border: '2px solid grey' }} | ||
> | ||
This Box uses MUI System props for quick customization. | ||
</Box> | ||
); | ||
} |
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,19 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
|
||
export default function BoxSystemProps() { | ||
return ( | ||
<Box | ||
height={200} | ||
width={200} | ||
my={4} | ||
display="flex" | ||
alignItems="center" | ||
gap={4} | ||
p={2} | ||
sx={{ border: '2px solid grey' }} | ||
> | ||
This Box uses MUI System props for quick customization. | ||
</Box> | ||
); | ||
} |
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,2 @@ | ||
|
||
This Box uses MUI System props for quick customization. |
Oops, something went wrong.