|
| 1 | +import { Breadcrumb } from "../dist/Breadcrumb"; |
| 2 | +import { sectionName } from "./sectionName"; |
| 3 | +import { getStoryFactory } from "./getStory"; |
| 4 | + |
| 5 | +const { meta, getStory } = getStoryFactory({ |
| 6 | + sectionName, |
| 7 | + "wrappedComponent": { Breadcrumb }, |
| 8 | + "description": ` |
| 9 | +- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/fil-d-ariane) |
| 10 | +- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Breadcrumb.tsx)`, |
| 11 | + "disabledProps": ["lang"] |
| 12 | +}); |
| 13 | + |
| 14 | +export default meta; |
| 15 | + |
| 16 | +export const Default = getStory({ |
| 17 | + label: "io" |
| 18 | + // links: [ |
| 19 | + // { label: "Accueil", href = "/" }, |
| 20 | + // { label: "Articles", href: "/articles" }, |
| 21 | + // { label: "Le premier", href: "/articles/first" } |
| 22 | + // ] |
| 23 | + //...logCallbacks(["onClick"]) |
| 24 | +}); |
| 25 | + |
| 26 | +export const BreadcrumbSecondary = getStory({ |
| 27 | + //"priority": "secondary", |
| 28 | + "label": "Simple button - secondary" |
| 29 | + // ...logCallbacks(["onClick"]) |
| 30 | +}); |
| 31 | + |
| 32 | +// export const ButtonTertiary = getStory({ |
| 33 | +// "priority": "tertiary", |
| 34 | +// "label": "Simple button - tertiary", |
| 35 | +// ...logCallbacks(["onClick"]) |
| 36 | +// }); |
| 37 | + |
| 38 | +// export const ButtonDisabled = getStory({ |
| 39 | +// "label": "Simple button - disabled", |
| 40 | +// "disabled": true, |
| 41 | +// ...logCallbacks(["onClick"]) |
| 42 | +// }); |
| 43 | + |
| 44 | +// export const ButtonWithIconDefault = getStory({ |
| 45 | +// "label": "Simple button with icon", |
| 46 | +// "icon": { |
| 47 | +// iconId: "fr-icon-account-circle-fill" |
| 48 | +// }, |
| 49 | +// ...logCallbacks(["onClick"]) |
| 50 | +// }); |
| 51 | + |
| 52 | +// export const ButtonWithIconLeft = getStory({ |
| 53 | +// "label": "Simple button with icon", |
| 54 | +// "icon": { |
| 55 | +// "iconId": "fr-icon-account-circle-fill", |
| 56 | +// "position": "left" |
| 57 | +// }, |
| 58 | +// ...logCallbacks(["onClick"]) |
| 59 | +// }); |
| 60 | + |
| 61 | +// export const ButtonWithIconRight = getStory({ |
| 62 | +// "label": "Simple button with icon", |
| 63 | +// "icon": { |
| 64 | +// "iconId": "fr-icon-account-circle-fill", |
| 65 | +// "position": "right" |
| 66 | +// }, |
| 67 | +// ...logCallbacks(["onClick"]) |
| 68 | +// }); |
| 69 | + |
| 70 | +// export const DefaultAnchorButton = getStory({ |
| 71 | +// "label": "Simple button - with href (anchor)", |
| 72 | +// "linkProps": { |
| 73 | +// "href": "https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/bouton", |
| 74 | +// "target": "_blank" |
| 75 | +// } |
| 76 | +// }); |
| 77 | + |
| 78 | +// export const DefaultAnchorButtonWithTargetBlank = getStory({ |
| 79 | +// "label": "Simple button - with href (anchor) and target _blank", |
| 80 | +// "linkProps": { |
| 81 | +// "target": "_blank", |
| 82 | +// "href": "https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/bouton" |
| 83 | +// } |
| 84 | +// }); |
0 commit comments