Closed adipasquale closed 1 year ago
I was hoping we could implement this as dsfr_button_to
, the GOV.UK way which we've followed for links. Did you look into it?
nope @freesteph I have not looked into it but I don’t think it’s incompatible, do you ? we can always implement the dsfr_button_to
helper later, no ? even if it means refactoring this button component
I don’t think we can get away without a Button component though, the same way we got away without a Link component. Buttons are used in other contexts than the button_to
rails helper allows for
let me know if that works with you @freesteph because the modal one is dependent on this one and I started using dsfr-view-components
with the modal branch on collectif objets :)
Okay cool. I'll look into the helper form at some point.
cf #62
label
param name for the actual button content as does the DSFR guide because it’s also possible to set a tag attributetitle
on the<button>
tag.:level
param that takes:primary, :secondary or :tertiary
. we could also useprimary: true
,secondary: true
... I don’t really have a preferenceicon
param that takes the class name without thefr-icon-
prefix, i.e.checkbox-line
+ a second paramicon_position : :left or :right
. This is quite different from what you had done with thedsfr_link_to
helper but I believe it’s a better direction. I feel it should be easy to add an icon without thinking about its position, soicon: "checkbox-line"
should work on its own. I don’t have a strong opinion though.icons are broken in the guide but i think it’s okay, I’ll double check