betagouv / dsfr-view-components

Composants Rails pour le DSFR
https://betagouv.github.io/dsfr-view-components
MIT License
31 stars 4 forks source link

component: header #152

Closed adipasquale closed 1 year ago

adipasquale commented 1 year ago

I created 3 subcomponents :

I also used a polymorphic slot for direct_links with the types option, cf viewcomponent doc

This allows calling :

and preserve the order when displaying them in the component view with direct_links.each do |direct_link|

The suffix _simple is quite unfortunate but I could not find a way to not have this suffix for the default case.

Screenshot 2023-03-13 at 16-06-26 En-tête - Header - Composants Rails ViewComponent pour le Système de Design de lʼÉtat

adipasquale commented 1 year ago

@freesteph I’m going to need to merge this to be able to use it in a new PR in collectif-objets because I'm already depending on the next PR with the Tabs

freesteph commented 1 year ago

Looking