|
| 1 | +import React from "react"; |
| 2 | +import { Header } from "../dist/Header"; |
| 3 | +import { sectionName } from "./sectionName"; |
| 4 | +import { getStoryFactory } from "./getStory"; |
| 5 | +import "./utils.css"; |
| 6 | + |
| 7 | +const { meta, getStory } = getStoryFactory({ |
| 8 | + sectionName, |
| 9 | + "wrappedComponent": { "MainNavigation": Header }, |
| 10 | + "description": ` |
| 11 | +- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/navigation-principale) |
| 12 | +- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Header/MainNavigation.tsx) |
| 13 | + |
| 14 | +This component isn't meant to be used directly but via the [\\<Header \\/\\>](https://react-dsfr-components.etalab.studio/?path=/docs/components-header).`, |
| 15 | + "disabledProps": ["lang"], |
| 16 | + "doHideImportInstruction": true |
| 17 | +}); |
| 18 | + |
| 19 | +export default meta; |
| 20 | + |
| 21 | +export const DirectLinks = getStory({ |
| 22 | + "brandTop": ( |
| 23 | + <> |
| 24 | + INTITULE |
| 25 | + <br /> |
| 26 | + OFFICIEL |
| 27 | + </> |
| 28 | + ), |
| 29 | + "homeLinkProps": { |
| 30 | + "href": "/", |
| 31 | + "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" |
| 32 | + }, |
| 33 | + "navItems": [ |
| 34 | + { |
| 35 | + "text": "accès direct", |
| 36 | + "linkProps": { |
| 37 | + "href": "#", |
| 38 | + "target": "_self" |
| 39 | + } |
| 40 | + }, |
| 41 | + { |
| 42 | + "text": "accès direct", |
| 43 | + "linkProps": { |
| 44 | + "href": "#", |
| 45 | + "target": "_self" |
| 46 | + }, |
| 47 | + "isActive": true |
| 48 | + }, |
| 49 | + { |
| 50 | + "text": "accès direct", |
| 51 | + "linkProps": { |
| 52 | + "href": "#", |
| 53 | + "target": "_self" |
| 54 | + } |
| 55 | + }, |
| 56 | + { |
| 57 | + "text": "accès direct", |
| 58 | + "linkProps": { |
| 59 | + "href": "#", |
| 60 | + "target": "_self" |
| 61 | + } |
| 62 | + } |
| 63 | + ] |
| 64 | +}); |
| 65 | + |
| 66 | +export const DropdownMenu = getStory({ |
| 67 | + "className": "margin-bottom-300px", |
| 68 | + "brandTop": ( |
| 69 | + <> |
| 70 | + INTITULE |
| 71 | + <br /> |
| 72 | + OFFICIEL |
| 73 | + </> |
| 74 | + ), |
| 75 | + "homeLinkProps": { |
| 76 | + "href": "/", |
| 77 | + "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" |
| 78 | + }, |
| 79 | + "navItems": [ |
| 80 | + { |
| 81 | + "text": "Entrée menu active", |
| 82 | + "isActive": true, |
| 83 | + "menuLinks": [ |
| 84 | + { |
| 85 | + "text": "Lien de navigation", |
| 86 | + "linkProps": { |
| 87 | + "href": "#" |
| 88 | + } |
| 89 | + }, |
| 90 | + { |
| 91 | + "text": "Lien de navigation", |
| 92 | + "linkProps": { |
| 93 | + "href": "#" |
| 94 | + } |
| 95 | + }, |
| 96 | + { |
| 97 | + "text": "Lien de navigation", |
| 98 | + "linkProps": { |
| 99 | + "href": "#" |
| 100 | + } |
| 101 | + }, |
| 102 | + { |
| 103 | + "text": "Lien de navigation", |
| 104 | + "linkProps": { |
| 105 | + "href": "#" |
| 106 | + }, |
| 107 | + "isActive": true |
| 108 | + }, |
| 109 | + { |
| 110 | + "text": "Lien de navigation", |
| 111 | + "linkProps": { |
| 112 | + "href": "#" |
| 113 | + } |
| 114 | + }, |
| 115 | + { |
| 116 | + "text": "Lien de navigation", |
| 117 | + "linkProps": { |
| 118 | + "href": "#" |
| 119 | + } |
| 120 | + } |
| 121 | + ] |
| 122 | + }, |
| 123 | + { |
| 124 | + "text": "accès direct", |
| 125 | + "menuLinks": [ |
| 126 | + { |
| 127 | + "text": "Lien de navigation", |
| 128 | + "linkProps": { |
| 129 | + "href": "#" |
| 130 | + } |
| 131 | + }, |
| 132 | + { |
| 133 | + "text": "Lien de navigation", |
| 134 | + "linkProps": { |
| 135 | + "href": "#" |
| 136 | + } |
| 137 | + }, |
| 138 | + { |
| 139 | + "text": "Lien de navigation", |
| 140 | + "linkProps": { |
| 141 | + "href": "#" |
| 142 | + } |
| 143 | + }, |
| 144 | + { |
| 145 | + "text": "Lien de navigation", |
| 146 | + "linkProps": { |
| 147 | + "href": "#" |
| 148 | + } |
| 149 | + }, |
| 150 | + { |
| 151 | + "text": "Lien de navigation", |
| 152 | + "linkProps": { |
| 153 | + "href": "#" |
| 154 | + } |
| 155 | + }, |
| 156 | + { |
| 157 | + "text": "Lien de navigation", |
| 158 | + "linkProps": { |
| 159 | + "href": "#" |
| 160 | + } |
| 161 | + } |
| 162 | + ] |
| 163 | + }, |
| 164 | + { |
| 165 | + "text": "accès direct", |
| 166 | + "linkProps": { |
| 167 | + "href": "#", |
| 168 | + "target": "_self" |
| 169 | + } |
| 170 | + }, |
| 171 | + { |
| 172 | + "text": "accès direct", |
| 173 | + "linkProps": { |
| 174 | + "href": "#", |
| 175 | + "target": "_self" |
| 176 | + } |
| 177 | + } |
| 178 | + ] |
| 179 | +}); |
0 commit comments