Skip to content

Commit

Permalink
chore: border radius changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tewarig committed Feb 13, 2025
1 parent 59a6593 commit 3e278c1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ const getProps = ({
variant,
color,
hasIcon,
borderRadiusToken,
}: {
buttonTypographyTokens: ButtonTypography;
childrenString?: string;
Expand All @@ -194,7 +193,6 @@ const getProps = ({
size: NonNullable<BaseButtonProps['size']>;
variant: NonNullable<BaseButtonProps['variant']>;
color: BaseButtonProps['color'];
borderRadiusToken: string;
}): BaseButtonStyleProps => {
if (variant === 'tertiary' && color !== 'primary' && color !== 'white') {
throwBladeError({
Expand Down Expand Up @@ -263,9 +261,7 @@ const getProps = ({
),
focusRingColor: getIn(theme.colors, 'surface.border.primary.muted'),
borderWidth: variant == 'secondary' ? makeBorderSize(theme.border.width.thin) : '0px',
borderRadius: borderRadiusToken
? makeBorderSize(borderRadiusToken)
: makeBorderSize(theme.border.radius.medium),
borderRadius: makeBorderSize(theme.border.radius.medium),
motionDuration: 'duration.xquick',
motionEasing: 'easing.standard',
};
Expand Down Expand Up @@ -405,7 +401,6 @@ const _BaseButton: React.ForwardRefRenderFunction<BladeElementRef, BaseButtonPro
theme,
color: buttonGroupProps.color ?? color,
hasIcon: Boolean(Icon),
borderRadiusToken: buttonGroupProps.borderRadiusToken,
});

const renderElement = React.useMemo(() => getRenderElement(href), [href]);
Expand Down
2 changes: 0 additions & 2 deletions packages/blade/src/components/ButtonGroup/ButtonGroup.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ const _ButtonGroup = (
color,
variant,
isFullWidth,
// In case of buttonGroup we don't need borderRadius in internal buttons
borderRadiusToken: 'theme.border.radius.none',
};

useVerifyAllowedChildren({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const StyledButtonGroup = styled(BaseBox)<StyledButtonGroupProps>(
overflow: 'hidden',
'button[role="button"]': {
flex: isFullWidth ? 1 : 'auto',
borderRadius: 0,
},

...(variant === 'secondary' && {
Expand Down
4 changes: 1 addition & 3 deletions packages/blade/src/components/ButtonGroup/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ type StyledButtonGroupProps = Pick<
type ButtonGroupContextType = Pick<
ButtonGroupProps,
'isDisabled' | 'isFullWidth' | 'size' | 'color' | 'variant'
> & {
borderRadiusToken: string;
};
>;

export type { ButtonGroupProps, StyledButtonGroupProps, ButtonGroupContextType };

0 comments on commit 3e278c1

Please sign in to comment.