Skip to content

Commit

Permalink
fix props
Browse files Browse the repository at this point in the history
  • Loading branch information
serdec committed Oct 11, 2023
1 parent ad106a0 commit 2745645
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/ButtonGroup/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const ButtonGroup = ({ labels, activeIndex, onClick }: ButtonGroupProps)
return (
<Button
key={index}
active={index === activeIndex}
position={position}
$active={index === activeIndex}
$position={position}
onClick={() => onClick?.(index)}
role="button"
>
Expand All @@ -28,8 +28,8 @@ export const ButtonGroup = ({ labels, activeIndex, onClick }: ButtonGroupProps)
type ButtonPosition = "left" | "center" | "right";

interface ButtonProps {
active: boolean;
position: ButtonPosition;
$active: boolean;
$position: ButtonPosition;
theme: DefaultTheme;
}

Expand Down Expand Up @@ -57,8 +57,8 @@ const Button = styled.button<ButtonProps>`
justify-content: center;
align-items: center;
border: none;
background: ${({ active, theme }: ButtonProps) =>
active
background: ${({ $active, theme }: ButtonProps) =>
$active
? theme.click.button.group.color.background.active
: theme.click.button.group.color.background.default};
color: ${({ theme }) => theme.click.button.group.color.text.default};
Expand All @@ -84,10 +84,10 @@ const Button = styled.button<ButtonProps>`
theme.click.button.basic.color.primary.background.disabled};
}
border-radius: ${({ position }: ButtonProps) =>
position === "left"
border-radius: ${({ $position }: ButtonProps) =>
$position === "left"
? leftBorderRadius
: position === "right"
: $position === "right"
? rightBorderRadius
: centerBorderRadius};
`;

0 comments on commit 2745645

Please sign in to comment.