bcc-code / bcc-design

Packages, assets and documentation to use the BCC Design System
https://developer.bcc.no/bcc-design
Apache License 2.0
3 stars 6 forks source link

BccButton disabled doesn't work in combination with the `:is` component param #316

Open StevenMalaihollo opened 4 days ago

StevenMalaihollo commented 4 days ago

Describe the bug

image

When setting the BccButton to disabled while using the is to enter in the component that the button is supposed to be, the disabled state is not taken into account.

Expected behavior

The styling and functionality of the disabled state should continue working when using the RouterLink component as BccButtons param.

root cause: commit_id

laurensgroeneveld commented 4 days ago

This is because the :disabled modifier is used to set the styles, but the disabled attribute only works on a button not an a element (even though it is set, it doesn't take effect). https://github.com/bcc-code/bcc-design/blob/main/design-library/src/components/BccButton/BccButton.css#L4