|
1 |
| -import { Template } from "./template"; |
| 1 | +import { BreadcrumbTitleHeadings, Template } from "./template"; |
2 | 2 |
|
3 | 3 | /**
|
4 | 4 | * Breadcrumbs show hierarchy and navigational context for a user's location within an app.
|
@@ -44,6 +44,28 @@ export default {
|
44 | 44 | },
|
45 | 45 | control: "boolean"
|
46 | 46 | },
|
| 47 | + titleHeadingSize: { |
| 48 | + name: "Breadcrumb title heading size", |
| 49 | + description: "The breadcrumb title can be customized in the multiline variant using an additional element that uses the typography component's heading classes. The preferred heading sizes are small, medium large, and extra-large. When no heading classes are used, the text will be sized the same as a large heading by default.", |
| 50 | + type: { name: "string" }, |
| 51 | + table: { |
| 52 | + type: { summary: "string" }, |
| 53 | + category: "Content", |
| 54 | + }, |
| 55 | + control: { |
| 56 | + type: "select", |
| 57 | + labels: { |
| 58 | + undefined: "Default", |
| 59 | + s: "Small", |
| 60 | + m: "Medium", |
| 61 | + l: "Large", |
| 62 | + xl: "Extra-large", |
| 63 | + }, |
| 64 | + }, |
| 65 | + defaultValue: undefined, |
| 66 | + options: [undefined, "s", "m", "l", "xl"], |
| 67 | + if: { arg: "variant", eq: "multiline" }, |
| 68 | + } |
47 | 69 | },
|
48 | 70 | args: {
|
49 | 71 | rootClass: "spectrum-Breadcrumbs",
|
@@ -241,6 +263,23 @@ Disabled.parameters = {
|
241 | 263 | chromatic: { disableSnapshot: true },
|
242 | 264 | };
|
243 | 265 |
|
| 266 | +/** |
| 267 | + * For the multiline variant, the breadcrumb title can be customized using an additional element that uses the heading classes from |
| 268 | + * the [typography component](?path=/docs/components-typography). The preferred heading sizes are `.spectrum-Heading--sizeS`, |
| 269 | + * `.spectrum-Heading--sizeM`, `.spectrum-Heading--sizeL` (default), and `.spectrum-Heading--sizeXL`. If no heading element or classes are |
| 270 | + * used, the text will be sized the same as a large heading by default. |
| 271 | + */ |
| 272 | +export const MultilineTitleSizes = BreadcrumbTitleHeadings.bind({}); |
| 273 | +MultilineTitleSizes.args = { |
| 274 | + ...DefaultNested.args, |
| 275 | + variant: "multiline", |
| 276 | +}; |
| 277 | +MultilineTitleSizes.storyName = "Multiline breadcrumb title heading sizes"; |
| 278 | +MultilineTitleSizes.tags= ["!dev"]; |
| 279 | +MultilineTitleSizes.parameters = { |
| 280 | + chromatic: { disableSnapshot: true }, |
| 281 | +}; |
| 282 | + |
244 | 283 | // ********* VRT ONLY ********* //
|
245 | 284 | /*
|
246 | 285 | export const WithForcedColors = BreadcrumbGroup.bind({});
|
|
0 commit comments