Skip to content

Commit

Permalink
fix cypress error with button
Browse files Browse the repository at this point in the history
  • Loading branch information
storywithoutend committed Jan 1, 2023
1 parent 7f60d86 commit d4751ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/src/components/atoms/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const ButtonElement = styled.button<ButtonElement>(
`,
)

const LabelWrapper = styled.label<{ $fullWidth?: boolean }>(
const ContentContainer = styled.div<{ $fullWidth?: boolean }>(
({ $fullWidth }) => css`
overflow: hidden;
text-overflow: ellipsis;
Expand All @@ -219,6 +219,7 @@ const CounterWrapper = styled.div(
display: flex;
align-items: center;
justify-content: flex-end;
pointer-events: none;
`,
)

Expand Down Expand Up @@ -278,7 +279,9 @@ export const Button = React.forwardRef(
ref: React.Ref<HTMLButtonElement>,
) => {
const labelContent = (
<LabelWrapper $fullWidth={fullWidthContent}>{children}</LabelWrapper>
<ContentContainer $fullWidth={fullWidthContent}>
{children}
</ContentContainer>
)
const spinnerColor = disabled ? 'greyPrimary' : 'backgroundPrimary'

Expand Down

0 comments on commit d4751ac

Please sign in to comment.