Skip to content

Commit

Permalink
Add pointer event none to disabled cards to avoid click event (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
vineethasok authored Dec 19, 2024
1 parent 00ff977 commit 7ac5a19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/CardHorizontal/CardHorizontal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const Wrapper = styled.div<{
${
$disabled
? `
pointer-events: none;
&,
&:hover,
&:active, &:focus, &:focus-within {
Expand Down
1 change: 1 addition & 0 deletions src/components/CardPrimary/CardPrimary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const Wrapper = styled.div<{
&[aria-disabled="true"]:hover,
&[aria-disabled="true"]:focus,
&[aria-disabled="true"]:active {
pointer-events: none;
${({ theme }) => `
background-color: ${theme.click.card.primary.color.background.disabled};
color: ${theme.click.card.primary.color.title.disabled};
Expand Down
1 change: 1 addition & 0 deletions src/components/CardSecondary/CardSecondary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const Wrapper = styled.div<{
&[aria-disabled="true"]:hover,
&[aria-disabled="true"]:focus,
&[aria-disabled="true"]:active {
pointer-events: none;
${({ theme }) => `
background-color: ${theme.click.card.secondary.color.background.disabled};
color: ${theme.click.card.secondary.color.title.disabled};
Expand Down

0 comments on commit 7ac5a19

Please sign in to comment.