Skip to content

Commit

Permalink
Merge pull request #181 from otto-de/B2BDS-211
Browse files Browse the repository at this point in the history
fix: [B2BDS-211] Apply disabled style for a button with href
  • Loading branch information
AnnaHoege authored Aug 24, 2023
2 parents 56bf837 + 899de46 commit 3564d2d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/core-components/src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}
}

&:disabled {
&:disabled, &.disabled {
cursor: default;
pointer-events: none;
background-color: var(--b2b-color-grey-50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ story080Anchor.args = {
};
story080Anchor.storyName = 'Anchor Button';

export const story090DisabledAnchor = Template.bind({});
story090DisabledAnchor.args = {
...defaultArgs,
href: 'https://www.otto.de',
disabled: true,
content: 'Disabled Anchor Button',
};
story090DisabledAnchor.storyName = 'Disabled Anchor Button';

const controls = {
variant: 'radio',
};
Expand Down
7 changes: 7 additions & 0 deletions packages/core-components/src/html/interaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@
<b2b-button variant="primary" disabled="true" size="100"
>Disabled primary</b2b-button
>
<b2b-button
variant="primary"
disabled="true"
size="100"
href="https://www.otto.de"
>Disabled primary with href</b2b-button
>
</div>

<b2b-headline size="100" no-margin="true">Active</b2b-headline>
Expand Down

0 comments on commit 3564d2d

Please sign in to comment.