From 2bd2abaa58bba73ccd6832e98d45ca72cad76ce2 Mon Sep 17 00:00:00 2001 From: swethab Date: Thu, 24 Aug 2023 10:16:23 +0530 Subject: [PATCH] fix: [B2BDS-211] Apply disabled style for a button with href --- ...raction-button--story-090-disabled-anchor.png | Bin 0 -> 7775 bytes .../src/components/button/button.scss | 2 +- .../src/components/button/button.stories.tsx | 9 +++++++++ .../core-components/src/html/interaction.html | 7 +++++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 packages/core-components/__snapshots__/components-interaction-button--story-090-disabled-anchor.png diff --git a/packages/core-components/__snapshots__/components-interaction-button--story-090-disabled-anchor.png b/packages/core-components/__snapshots__/components-interaction-button--story-090-disabled-anchor.png new file mode 100644 index 0000000000000000000000000000000000000000..a233261eaf803bb1a19df0200c5f5ec0d559a01b GIT binary patch literal 7775 zcmeHMYfzI{8V;ALTQBJ@ol?<&yPbi~T16KDeXc6$jO(=vm9ngdXG$vdEgx0EM zDmc!L3IvEO(m+Cp5+OoJ0;Pi0A|kl}Aqg02OhQOBKmr8VbLhG7Dz&2M|WjX)qaA3gH%Nd)38aOnJO!#Xew7AX_J;6yqZc@WX^bh{3L z@Z5UzQ4Z|D>0u*M_hib30g)-W~1~f0WJQ*bE=|M?c>Ym;ARqcP7(! zc#<0TV*5N5ro&VD=jy(8-7rPhUVo52I30=~wCU^H=EtN&J|9Ma_(qbaaDfL1)pn9s=c8_2WE|#=Hdj_wj`6eA3QrhT_cqI8r<`-=?%lj~%h3I$i!>_$(_b->Ii$P5 z0++>?mcXYrC#E@%|73@c2kiDBl_#QPND z(^Bi?%)C)S);(`n?DbkXzPyaKYbCfg0J3zHm-*kP)g(EOpV@~qsf6U0KUI35P#kt5 zcRr0?TU%bSwf(_^B$LpZR#sLfeevRj!t*J9NUg@KM|w7cQz$6&(LHyH#f3D#_23tqHwre`Lk!oQTual7hCA+xOl0MYSq6S zpwHP}Ydqe6ztLs=7Rk!;5>-y%E6AF@vgFgJo33BKzWA#C8m_R=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HEHiJ?Y(^YGOnmdD3i%3S>Ls`w!RtrN(m-ta9Dq;oH=0Y`d{`{d z7n{9(d<^yli}cJs{jycf{UEYj0{o?5P(`n*VuAjYAW*h|QU#Iq5>ndNY;VG7U!fk6OZYx9j4kztLH7rvo%Gw4BcM!s5x zUU_{@PZ9VB1SDXwSahChSepi_1%NS*@|aJn4_JO$_o1&w7ai_V7O@$Ll)u*WQ-l8w zocR7rtroTm|Dd2`Koj-r!fwz-JUl&Hpozh=z*>uE?#T~itTC3CYNRaPkl}05G!ZbY zxz0Wpv;cZ-zZcEker3(=Bf8w8O4gP)frk*kdet_4!zCTmIfiKo>T^a5Vwk4}GAsln zTpdo7<^PP>@8@@llMv-P<<1<|#j&L-d--UGf5|2Ig2Y9JutViA$&m*u>6@LLvo6FH!8i=YVK5GZ`5oSiIn4C`-AwJ6V9E}--?rzGdeIZ} xnd=_!wYRS6$JSo6c31qexwqG8?Hw%EDdt-{`{B*bF}SOC^l;3_EeF%T`VW2&ZleGI literal 0 HcmV?d00001 diff --git a/packages/core-components/src/components/button/button.scss b/packages/core-components/src/components/button/button.scss index ed6df4a7..4b64452a 100644 --- a/packages/core-components/src/components/button/button.scss +++ b/packages/core-components/src/components/button/button.scss @@ -76,7 +76,7 @@ } } - &:disabled { + &:disabled, &.disabled { cursor: default; pointer-events: none; background-color: var(--b2b-color-grey-50); diff --git a/packages/core-components/src/components/button/button.stories.tsx b/packages/core-components/src/components/button/button.stories.tsx index e75e5666..66a0bd6b 100644 --- a/packages/core-components/src/components/button/button.stories.tsx +++ b/packages/core-components/src/components/button/button.stories.tsx @@ -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', }; diff --git a/packages/core-components/src/html/interaction.html b/packages/core-components/src/html/interaction.html index 4108fdfa..95ccbdf7 100644 --- a/packages/core-components/src/html/interaction.html +++ b/packages/core-components/src/html/interaction.html @@ -284,6 +284,13 @@ Disabled primary + Disabled primary with href Active