-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Revise and expand Joy UI "Breadcrumbs" page (#35292)
Signed-off-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Co-authored-by: Siriwat K <siriwatkunaporn@gmail.com>
- Loading branch information
1 parent
2f7afc2
commit 1ea442d
Showing
17 changed files
with
266 additions
and
112 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
16 changes: 0 additions & 16 deletions
16
docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.tsx.preview
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,66 @@ | ||
import * as React from 'react'; | ||
import Breadcrumbs from '@mui/joy/Breadcrumbs'; | ||
import Link from '@mui/joy/Link'; | ||
import Stack from '@mui/joy/Stack'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function BreadcrumbsSizes() { | ||
return ( | ||
<Stack sx={{ display: 'flex', alignItems: 'center' }}> | ||
<Breadcrumbs separator="—" aria-label="breadcrumbs" size="sm"> | ||
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => ( | ||
<Link | ||
// `preventDefault` is for demo purposes | ||
// and is generally not needed in your app | ||
onClick={(event) => event.preventDefault()} | ||
key={item} | ||
underline="hover" | ||
color="neutral" | ||
fontSize="inherit" | ||
href="/" | ||
> | ||
{item} | ||
</Link> | ||
))} | ||
|
||
<Typography fontSize="inherit">Dr. Zoidberg</Typography> | ||
</Breadcrumbs> | ||
<Breadcrumbs separator="—" aria-label="breadcrumbs" size="md"> | ||
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => ( | ||
<Link | ||
// `preventDefault` is for demo purposes | ||
// and is generally not needed in your app | ||
onClick={(event) => event.preventDefault()} | ||
key={item} | ||
underline="hover" | ||
color="neutral" | ||
fontSize="inherit" | ||
href="/" | ||
> | ||
{item} | ||
</Link> | ||
))} | ||
|
||
<Typography fontSize="inherit">Dr. Zoidberg</Typography> | ||
</Breadcrumbs> | ||
<Breadcrumbs separator="—" aria-label="breadcrumbs" size="lg"> | ||
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => ( | ||
<Link | ||
// `preventDefault` is for demo purposes | ||
// and is generally not needed in your app | ||
onClick={(event) => event.preventDefault()} | ||
key={item} | ||
underline="hover" | ||
color="neutral" | ||
fontSize="inherit" | ||
href="/" | ||
> | ||
{item} | ||
</Link> | ||
))} | ||
|
||
<Typography fontSize="inherit">Dr. Zoidberg</Typography> | ||
</Breadcrumbs> | ||
</Stack> | ||
); | ||
} |
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,63 @@ | ||
import * as React from 'react'; | ||
import Breadcrumbs from '@mui/joy/Breadcrumbs'; | ||
import Link from '@mui/joy/Link'; | ||
import Stack from '@mui/joy/Stack'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function BreadcrumbsSizes() { | ||
return ( | ||
<Stack sx={{ display: 'flex', alignItems: 'center' }}> | ||
<Breadcrumbs separator="—" aria-label="breadcrumbs" size="sm"> | ||
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item: string) => ( | ||
<Link | ||
// `preventDefault` is for demo purposes | ||
// and is generally not needed in your app | ||
onClick={(event) => event.preventDefault()} | ||
key={item} | ||
underline="hover" | ||
color="neutral" | ||
fontSize="inherit" | ||
href="/" | ||
> | ||
{item} | ||
</Link> | ||
))} | ||
<Typography fontSize="inherit">Dr. Zoidberg</Typography> | ||
</Breadcrumbs> | ||
<Breadcrumbs separator="—" aria-label="breadcrumbs" size="md"> | ||
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item: string) => ( | ||
<Link | ||
// `preventDefault` is for demo purposes | ||
// and is generally not needed in your app | ||
onClick={(event) => event.preventDefault()} | ||
key={item} | ||
underline="hover" | ||
color="neutral" | ||
fontSize="inherit" | ||
href="/" | ||
> | ||
{item} | ||
</Link> | ||
))} | ||
<Typography fontSize="inherit">Dr. Zoidberg</Typography> | ||
</Breadcrumbs> | ||
<Breadcrumbs separator="—" aria-label="breadcrumbs" size="lg"> | ||
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item: string) => ( | ||
<Link | ||
// `preventDefault` is for demo purposes | ||
// and is generally not needed in your app | ||
onClick={(event) => event.preventDefault()} | ||
key={item} | ||
underline="hover" | ||
color="neutral" | ||
fontSize="inherit" | ||
href="/" | ||
> | ||
{item} | ||
</Link> | ||
))} | ||
<Typography fontSize="inherit">Dr. Zoidberg</Typography> | ||
</Breadcrumbs> | ||
</Stack> | ||
); | ||
} |
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
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
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.