-
-
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.
[docs][joy] Add typography introduction demo component (#37553)
Signed-off-by: Steve Ernstberger <[email protected]> Co-authored-by: Danilo Leal <[email protected]>
- Loading branch information
1 parent
05b7cdb
commit d02960f
Showing
2 changed files
with
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import * as React from 'react'; | ||
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo'; | ||
import Typography from '@mui/joy/Typography'; | ||
import { Box } from '@mui/joy'; | ||
|
||
export default function TypographyUsages() { | ||
return ( | ||
<JoyUsageDemo | ||
componentName="Typography" | ||
data={[ | ||
{ | ||
propName: 'level', | ||
knob: 'select', | ||
defaultValue: 'h1', | ||
options: [ | ||
'display1', | ||
'display2', | ||
'h1', | ||
'h2', | ||
'h3', | ||
'h4', | ||
'h5', | ||
'h6', | ||
'body1', | ||
'body2', | ||
'body3', | ||
], | ||
}, | ||
|
||
{ | ||
propName: 'color', | ||
knob: 'color', | ||
defaultValue: 'neutral', | ||
}, | ||
|
||
{ | ||
propName: 'variant', | ||
knob: 'select', | ||
defaultValue: 'plain', | ||
options: ['plain', 'outlined', 'soft', 'solid'], | ||
}, | ||
|
||
{ | ||
propName: 'children', | ||
knob: 'input', | ||
defaultValue: 'Typography', | ||
}, | ||
|
||
{ | ||
propName: 'noWrap', | ||
knob: 'switch', | ||
defaultValue: false, | ||
}, | ||
]} | ||
renderDemo={(props) => ( | ||
<Box sx={{ maxWidth: '400px' }}> | ||
<Typography {...props}>{props.children}</Typography> | ||
</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