-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5363e3
commit 6455d15
Showing
3 changed files
with
86 additions
and
38 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
62 changes: 44 additions & 18 deletions
62
apps/site/src/content/design-system/components/breadcrumb/accessibilityDemo.mdoc
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,21 +1,47 @@ | ||
```jsx | ||
// Using the Link component (as NextLink) from 'next/LinkLink' | ||
<Breadcrumb> | ||
<NextLink href="#test" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Anchor item</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Another anchor item</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item isDisabled tag="a"> | ||
Disabled item | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item isCurrent tag="a"> | ||
Last item | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
<div className="flex flex-col gap-5"> | ||
<Breadcrumb aria-label="Page transitions and the such"> | ||
<NextLink href="#home" passHref legacyBehavior> | ||
<Breadcrumb.Item isCurrent tag="a">Home</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
<Breadcrumb aria-label="Page transitions and the such"> | ||
<NextLink href="#home" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Home</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#personal" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a" isCurrent>Personal</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
<Breadcrumb aria-label="Page transitions and the such"> | ||
<NextLink href="#home" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Home</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#personal" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Personal</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#credit-cards" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a" isCurrent>Credit cards</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
<Breadcrumb> | ||
<NextLink href="#test" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Anchor item</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Another anchor item</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item isDisabled tag="a"> | ||
Disabled item | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item isCurrent tag="a"> | ||
Last item | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
</div> | ||
``` |
60 changes: 41 additions & 19 deletions
60
apps/site/src/content/design-system/components/breadcrumb/code.mdoc
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,23 +1,45 @@ | ||
## Breadcrumb | ||
### Default breadcrumb | ||
|
||
```jsx | ||
// Using the Link component (as NextLink) from 'next/LinkLink' | ||
<Breadcrumb> | ||
<NextLink href="#test" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Anchor item</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Another anchor item</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item isDisabled tag="a"> | ||
Disabled item | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item isCurrent tag="a"> | ||
Last item | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
<div> | ||
<Breadcrumb> | ||
<NextLink href="#test" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Anchor item</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Another anchor item</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item isDisabled tag="a"> | ||
Disabled item | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#another" passHref legacyBehavior> | ||
<Breadcrumb.Item isCurrent tag="a"> | ||
Last item | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
</div> | ||
``` | ||
|
||
### As router | ||
|
||
```jsx | ||
<div> | ||
<Breadcrumb aria-label="Page transitions and the such"> | ||
<NextLink href="#home" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Home</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#personal" passHref legacyBehavior> | ||
<Breadcrumb.Item tag="a">Personal</Breadcrumb.Item> | ||
</NextLink> | ||
<NextLink href="#credit-cards" passHref legacyBehavior> | ||
<Breadcrumb.Item isCurrent tag="a"> | ||
Credit cards | ||
</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
</div> | ||
``` |