From 83eb87aad590369c7961cf62bcd1ced2360ee5f9 Mon Sep 17 00:00:00 2001 From: Chris Murray <39704901+chris-at-jobber@users.noreply.github.com> Date: Fri, 23 Jul 2021 16:13:45 -0600 Subject: [PATCH] add breadcrumb to Page --- packages/components/src/Page/Page.mdx | 9 +++++++++ packages/components/src/Page/Page.tsx | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/packages/components/src/Page/Page.mdx b/packages/components/src/Page/Page.mdx index 522de19f81..354fb50183 100644 --- a/packages/components/src/Page/Page.mdx +++ b/packages/components/src/Page/Page.mdx @@ -25,6 +25,7 @@ import { Page } from "@jobber/components/Page"; @@ -38,6 +39,12 @@ Using Page is pretty straightforward - after any navigational elements, Page should contain the content the user will be engaging with. If there is any sort of footer, it should exist after Page. +The breadcrumb jumps up one level in the application's directory hierarchy, so +the label should reflect the destination. + +- **Do:** use the breadcrumb's destination page title as the breadcrumb label +- **Don't:** use "Back" or "Back to {destination}" as the breadcrumb label. + ## Props @@ -48,6 +55,7 @@ of footer, it should exist after Page. alert("🥨") }} @@ -99,6 +107,7 @@ Use a subtitle when you need to supplement a page title. + {breadcrumb && ( + + )}
{title}