From ffe287f20b00b9f14960af9b7f76f00e4870e61c Mon Sep 17 00:00:00 2001 From: KaustubhKumar05 Date: Tue, 19 Mar 2024 15:15:44 +0530 Subject: [PATCH] fix: button css --- .../roomkit-react/src/IconButton/IconButton.tsx | 9 ++------- .../roomkit-react/src/Prebuilt/IconButton.tsx | 16 ++++++---------- .../IconButtonWithOptions.tsx | 14 +++++++------- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/packages/roomkit-react/src/IconButton/IconButton.tsx b/packages/roomkit-react/src/IconButton/IconButton.tsx index c66cc5b0a8..297137cfb6 100644 --- a/packages/roomkit-react/src/IconButton/IconButton.tsx +++ b/packages/roomkit-react/src/IconButton/IconButton.tsx @@ -25,19 +25,14 @@ export const IconButton = styled('button', { '&[disabled]': { opacity: 0.5, cursor: 'not-allowed', + backgroundColor: '$secondary_dim', + color: '$on_primary_high', }, '&:focus': { outline: 'none', }, variants: { active: { - false: { - backgroundColor: '$secondary_dim', - color: '$on_primary_high', - '&:not([disabled]):hover': { - backgroundColor: '$secondary_default', - }, - }, true: { '&:not([disabled]):hover': { backgroundColor: '$on_surface_low', diff --git a/packages/roomkit-react/src/Prebuilt/IconButton.tsx b/packages/roomkit-react/src/Prebuilt/IconButton.tsx index 3694779ad8..e66d9a6330 100644 --- a/packages/roomkit-react/src/Prebuilt/IconButton.tsx +++ b/packages/roomkit-react/src/Prebuilt/IconButton.tsx @@ -7,22 +7,18 @@ const IconButton = styled(BaseIconButton, { border: '1px solid $border_bright', bg: '$background_dim', r: '$1', + '&[disabled]': { + opacity: 0.5, + cursor: 'not-allowed', + backgroundColor: '$secondary_dim', + color: '$on_primary_high', + }, variants: { active: { true: { color: '$on_surface_high', backgroundColor: 'transparent', }, - false: { - border: '1px solid transparent', - color: '$on_primary_high', - }, - }, - disabled: { - true: { - backgroundColor: '$surface_brighter', - color: '$on_surface_low', - }, }, }, }); diff --git a/packages/roomkit-react/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx b/packages/roomkit-react/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx index e6e9be3b62..cf36bc6c3f 100644 --- a/packages/roomkit-react/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx @@ -25,9 +25,9 @@ const IconSection = styled(IconButton, { p: '$4', r: '$1', bg: 'transparent', - borderTopRightRadius: 0, + borderTopRightRadius: '0 !important', borderColor: '$border_bright', - borderBottomRightRadius: 0, + borderBottomRightRadius: '0 !important', position: 'relative', '&:not([disabled]):focus-visible': { zIndex: 1, @@ -41,8 +41,8 @@ const IconSection = styled(IconButton, { ...variants, hideOptions: { true: { - borderTopRightRadius: '$1', - borderBottomRightRadius: '$1', + borderTopRightRadius: '$1 !important', + borderBottomRightRadius: '$1 !important', }, }, }, @@ -53,10 +53,10 @@ const OptionsSection = styled(IconButton, { h: '$14', p: '$4 $2', r: '$1', - borderTopLeftRadius: 0, + borderTopLeftRadius: '0 !important', borderColor: '$border_bright', - borderBottomLeftRadius: 0, - borderLeftWidth: 0, + borderBottomLeftRadius: '0 !important', + borderLeftWidth: '0 !important', position: 'relative', '&:not([disabled]):focus-visible': { zIndex: 1,