Skip to content

Commit

Permalink
[joy-ui][typography] Update docs after lineHeight changes (mui#39366)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanivan authored and mnajdova committed Oct 13, 2023
1 parent aa17699 commit d4e768d
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 270 deletions.
219 changes: 86 additions & 133 deletions docs/data/joy/components/typography/TypographyTitleBody.js
Original file line number Diff line number Diff line change
@@ -1,160 +1,113 @@
import * as React from 'react';
import Stack from '@mui/joy/Stack';
import Typography from '@mui/joy/Typography';
import SvgIcon from '@mui/joy/SvgIcon';
import Card from '@mui/joy/Card';
import Stack from '@mui/joy/Stack';

export default function TypographyTitleBody() {
return (
<Stack
spacing={2}
sx={{
maxWidth: '60ch',
'& *:not(path, i)': { outline: '1px solid rgb(255 53 53 / 40%)' },
}}
>
<Stack direction="row" spacing={1.5}>
<SvgIcon size="lg">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
<Card>
<Typography level="title-lg">
Title of the component{' '}
<Typography
level="title-lg"
textColor="var(--joy-palette-success-plainColor)"
fontFamily="monospace"
sx={{ opacity: '50%' }}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"
/>
</svg>
</SvgIcon>
<div>
<Typography level="title-lg">
<i>title-lg</i>: Title of the component
title-lg
</Typography>
<Typography level="body-lg">
<i>body-lg</i>: This is the description of the component that contain
some information of it.
</Typography>
</div>
</Stack>

<Stack direction="row" spacing={1.5}>
<SvgIcon size="lg">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
</Typography>
<Typography level="body-md">
This is the description of the component that contain some information of
it.{' '}
<Typography
level="body-md"
textColor="var(--joy-palette-success-plainColor)"
fontFamily="monospace"
sx={{ opacity: '50%' }}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"
/>
</svg>
</SvgIcon>
<div>
<Typography level="title-lg">
<i>title-lg</i>: Title of the component
body-md
</Typography>
<Typography level="body-md">
<i>body-md</i>: This is the description of the component that contain
some information of it.
</Typography>
</div>
</Stack>

<Stack direction="row" spacing={1.5}>
<SvgIcon size="lg">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
</Typography>
</Card>
<Card>
<Typography level="title-md">
Title of the component{' '}
<Typography
level="title-md"
textColor="var(--joy-palette-success-plainColor)"
fontFamily="monospace"
sx={{ opacity: '50%' }}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"
/>
</svg>
</SvgIcon>
<div>
<Typography level="title-lg">
<i>title-lg</i>: Title of the component
</Typography>
<Typography level="body-md">
<i>body-md</i>: This is the description of the component that contain
some information of it.
title-md
</Typography>
<Typography level="body-sm">
<i>body-sm</i>: Metadata, e.g. a date.
</Typography>
</div>
</Stack>

<Stack direction="row" spacing={1.5}>
<SvgIcon>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
</Typography>
<Typography level="body-md">
This is the description of the component that contain some information of
it.{' '}
<Typography
level="body-md"
textColor="var(--joy-palette-success-plainColor)"
fontFamily="monospace"
sx={{ opacity: '50%' }}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"
/>
</svg>
</SvgIcon>
<div>
<Typography level="title-md">
<i>title-md</i>: Title of the component
body-md
</Typography>
<Typography level="body-md">
<i>body-md</i>: This is the description of the component that contain
some information of it.
</Typography>
<Typography level="body-sm">
<i>body-sm</i>: Metadata, e.g. a date.
</Typography>
<Typography level="body-sm">
Metadata, e.g. a date.{' '}
<Typography
level="body-sm"
textColor="var(--joy-palette-success-plainColor)"
fontFamily="monospace"
sx={{ opacity: '50%' }}
>
body-sm
</Typography>
</div>
</Stack>

<Stack direction="row" spacing={1.5}>
<SvgIcon size="sm">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
</Typography>
</Card>
<Card>
<Typography level="title-sm">
Title of the component{' '}
<Typography
level="title-sm"
textColor="var(--joy-palette-success-plainColor)"
fontFamily="monospace"
sx={{ opacity: '50%' }}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"
/>
</svg>
</SvgIcon>
<div>
<Typography level="title-sm">
<i>title-sm</i>: Title of the component
title-sm
</Typography>
<Typography level="body-sm">
<i>body-sm</i>: This is the description of the component that contain
some information of it.
</Typography>
<Typography level="body-sm">
This is the description of the component that contain some information of
it.{' '}
<Typography
level="body-sm"
textColor="var(--joy-palette-success-plainColor)"
fontFamily="monospace"
sx={{ opacity: '50%' }}
>
body-sm
</Typography>
<Typography level="body-xs">
<i>body-xs</i>: Metadata, e.g. a date.
</Typography>
<Typography level="body-xs">
Metadata, e.g. a date.{' '}
<Typography
level="body-xs"
textColor="var(--joy-palette-success-plainColor)"
fontFamily="monospace"
sx={{ opacity: '50%' }}
>
body-xs
</Typography>
</div>
</Stack>
</Typography>
</Card>
</Stack>
);
}
Loading

0 comments on commit d4e768d

Please sign in to comment.