-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from WestpacGEL/fixes/breadcrumb-examples
Fixes/Breadcrumb examples
- Loading branch information
Showing
3 changed files
with
53 additions
and
57 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
36 changes: 21 additions & 15 deletions
36
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
46 changes: 27 additions & 19 deletions
46
apps/site/src/content/design-system/components/breadcrumb/design/breadcrumbs/content.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,31 @@ | ||
Breadcrumbs come in one style for navigational consistency across all touch-points. | ||
|
||
```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> | ||
// Using the Link component (as NextLink) from 'next/Link' | ||
<div className="flex flex-col gap-4"> | ||
<Breadcrumb aria-label="Page transitions and the such" className="px-3 py-1 mt-2"> | ||
<NextLink href="#home" passHref legacyBehavior> | ||
<Breadcrumb.Item isCurrent tag="a">Home</Breadcrumb.Item> | ||
</NextLink> | ||
</Breadcrumb> | ||
<Breadcrumb aria-label="Page transitions and the such" className="px-3 py-1"> | ||
<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" className="px-3 py-1 mb-2"> | ||
<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> | ||
</div> | ||
``` |