Skip to content

Commit

Permalink
fix button variant camel case (#171)
Browse files Browse the repository at this point in the history
* fix button variant camel case

* up version
  • Loading branch information
mdlucas authored Feb 5, 2024
1 parent 18c8a74 commit b7e6a14
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@platformbuilders/fluid-react",
"version": "1.2.2",
"version": "1.2.3",
"private": false,
"description": "Builders React for Fluid Design System",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Button: FC<ButtonProps> = ({
typographyVariant = 'md',
leftIconName,
rightIconName,
colorVariant = 'primary',
$colorVariant = 'primary',
size = 'normal',
...rest
}) => {
Expand All @@ -31,7 +31,7 @@ const Button: FC<ButtonProps> = ({
disabled: loading || disabled,
variant,
onPress,
colorVariant,
$colorVariant,
size,
};

Expand Down
8 changes: 4 additions & 4 deletions src/components/Button/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ type ButtonWrapperProps = ButtonProps & ThemeProps;

const getStylesButton = (props: ButtonWrapperProps) => {
const colorButton =
getTheme(`brand.${props.colorVariant}.main`)(props) ||
getTheme(`${props.colorVariant}.main`)(props);
getTheme(`brand.${props.$colorVariant}.main`)(props) ||
getTheme(`${props.$colorVariant}.main`)(props);
const colorConstrastButton =
getTheme(`brand.${props.colorVariant}.contrast`)(props) ||
getTheme(`${props.colorVariant}.contrast`)(props);
getTheme(`brand.${props.$colorVariant}.contrast`)(props) ||
getTheme(`${props.$colorVariant}.contrast`)(props);
const defaultTheme = css`
background-color: ${colorButton};
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type ButtonProps = {
children?: string | ReactNode;
leftIconName?: keyof typeof RadixIcon;
rightIconName?: keyof typeof RadixIcon;
colorVariant?: ButtonColorType;
$colorVariant?: ButtonColorType;
size?: 'normal' | 'medium' | 'large';
} & TouchableType;

Expand Down

0 comments on commit b7e6a14

Please sign in to comment.