|
| 1 | +import DsfrErrorPage from './DsfrErrorPage.vue' |
| 2 | + |
| 3 | +export default { |
| 4 | + component: DsfrErrorPage, |
| 5 | + title: 'Composants/DsfrErrorPage', |
| 6 | + argTypes: { |
| 7 | + title: { |
| 8 | + control: 'text', |
| 9 | + description: 'Conséquence de l\'erreur rencontrée.', |
| 10 | + }, |
| 11 | + subtitle: { |
| 12 | + control: 'text', |
| 13 | + description: 'Code d\'erreur HTTP à l\'origine de l\'erreur rencontrée.', |
| 14 | + }, |
| 15 | + description: { |
| 16 | + control: 'text', |
| 17 | + description: 'Description de l\'erreur et formule d\'excuses à l\'utilisateur.', |
| 18 | + }, |
| 19 | + help: { |
| 20 | + control: 'text', |
| 21 | + description: 'Accompagnement de l\'utilisateur qui se retrouve confronté à l\'erreur.', |
| 22 | + }, |
| 23 | + buttons: { |
| 24 | + control: 'object', |
| 25 | + description: 'Tableau d\'objets contenant les props des boutons d\'actions sur la page.', |
| 26 | + }, |
| 27 | + } |
| 28 | +} |
| 29 | + |
| 30 | +export const PageErreur404 = (args) => ({ |
| 31 | + components: { DsfrErrorPage }, |
| 32 | + data () { |
| 33 | + return args |
| 34 | + }, |
| 35 | + template: ` |
| 36 | + <DsfrErrorPage |
| 37 | + :title="title" |
| 38 | + :subtitle="subtitle" |
| 39 | + :description="description" |
| 40 | + :help="help" |
| 41 | + :buttons="buttons" |
| 42 | + /> |
| 43 | + `, |
| 44 | + |
| 45 | +}) |
| 46 | + |
| 47 | +PageErreur404.args = { |
| 48 | + title: "Page non trouvée, ne paniquez pas", |
| 49 | + subtitle: "Erreur 404 !", |
| 50 | + description: "La page que vous recherchez n'existe pas ou l'url est erronée.", |
| 51 | + help: "Bonne chance !", |
| 52 | + buttons: [{ |
| 53 | + label: 'Page d\'accueil', |
| 54 | + link: 'https://www.systeme-de-design.gouv.fr/', |
| 55 | + }, |
| 56 | + { |
| 57 | + label: 'Contactez-nous', |
| 58 | + secondary: true, |
| 59 | + link: 'https://www.systeme-de-design.gouv.fr/', |
| 60 | + },], |
| 61 | +} |
0 commit comments