|
| 1 | +import { Tile } from "../dist/Tile"; |
| 2 | +import { sectionName } from "./sectionName"; |
| 3 | +import { getStoryFactory } from "./getStory"; |
| 4 | + |
| 5 | +const { meta, getStory } = getStoryFactory({ |
| 6 | + sectionName, |
| 7 | + "wrappedComponent": { Tile }, |
| 8 | + "defaultContainerWidth": 300, |
| 9 | + "description": ` |
| 10 | +- [See DSFR documentation](//www.systeme-de-design.gouv.fr/elements-d-interface/composants/tuile) |
| 11 | +- [See DSFR demos](https://main--ds-gouv.netlify.app/example/component/tile/) |
| 12 | +- [See source code](//github.com/codegouvfr/react-dsfr/blob/main/src/Tile.tsx)`, |
| 13 | + "disabledProps": ["lang"] |
| 14 | +}); |
| 15 | + |
| 16 | +export default meta; |
| 17 | + |
| 18 | +export const Default = getStory({ |
| 19 | + "linkProps": { "href": "#" }, |
| 20 | + "title": "Titre de la tuile", |
| 21 | + "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dol", |
| 22 | + "enlargeLink": true, |
| 23 | + "horizontal": false |
| 24 | +}); |
| 25 | + |
| 26 | +export const TileWithoutEnlargeLink = getStory({ |
| 27 | + "linkProps": { href: "#" }, |
| 28 | + "title": "Titre de la tuile", |
| 29 | + "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dol", |
| 30 | + "enlargeLink": false |
| 31 | +}); |
| 32 | + |
| 33 | +export const TileWithImage = getStory({ |
| 34 | + "linkProps": { "href": "#" }, |
| 35 | + "title": "Titre de la tuile", |
| 36 | + "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dol", |
| 37 | + "enlargeLink": false, |
| 38 | + "imageUrl": "//www.gouvernement.fr/sites/default/files/static_assets/placeholder.1x1.png" |
| 39 | +}); |
| 40 | + |
| 41 | +export const TileWithImageGrey = getStory({ |
| 42 | + "linkProps": { "href": "#" }, |
| 43 | + "title": "Titre de la tuile", |
| 44 | + "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dol", |
| 45 | + "enlargeLink": false, |
| 46 | + "imageUrl": "//www.gouvernement.fr/sites/default/files/static_assets/placeholder.1x1.png", |
| 47 | + "grey": true |
| 48 | +}); |
| 49 | + |
| 50 | +export const TileHorizontalWithImage = getStory( |
| 51 | + { |
| 52 | + "linkProps": { "href": "#" }, |
| 53 | + "horizontal": true, |
| 54 | + "title": "Titre de la tuile", |
| 55 | + "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dol", |
| 56 | + "enlargeLink": true, |
| 57 | + "imageUrl": "//www.gouvernement.fr/sites/default/files/static_assets/placeholder.1x1.png" |
| 58 | + }, |
| 59 | + { "defaultContainerWidth": "100%" } |
| 60 | +); |
0 commit comments