From d4751ac8900e9c1712d53f1a4dd0cdc83a7eb9be Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Sun, 1 Jan 2023 20:53:15 +0800 Subject: [PATCH] fix cypress error with button --- components/src/components/atoms/Button/Button.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/src/components/atoms/Button/Button.tsx b/components/src/components/atoms/Button/Button.tsx index 91e4f1a8..31b49144 100644 --- a/components/src/components/atoms/Button/Button.tsx +++ b/components/src/components/atoms/Button/Button.tsx @@ -195,7 +195,7 @@ const ButtonElement = styled.button( `, ) -const LabelWrapper = styled.label<{ $fullWidth?: boolean }>( +const ContentContainer = styled.div<{ $fullWidth?: boolean }>( ({ $fullWidth }) => css` overflow: hidden; text-overflow: ellipsis; @@ -219,6 +219,7 @@ const CounterWrapper = styled.div( display: flex; align-items: center; justify-content: flex-end; + pointer-events: none; `, ) @@ -278,7 +279,9 @@ export const Button = React.forwardRef( ref: React.Ref, ) => { const labelContent = ( - {children} + + {children} + ) const spinnerColor = disabled ? 'greyPrimary' : 'backgroundPrimary'