Skip to content

Commit

Permalink
remove font-size of button
Browse files Browse the repository at this point in the history
added padding from theme
  • Loading branch information
mdlucas committed Dec 12, 2023
1 parent 01deb9c commit f821982
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/Button/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import Typography from '../Typography';
import { ButtonProps } from './types';

const buttonRadius = getTheme('themeRadius.button');
const spacingSm = getTheme('spacing.sm');
const borderWidthSm = getTheme('borderWidth.sm');
const isDisabled = ifStyle('disabled');

type ButtonWrapperProps = ButtonProps & ThemeProps;
Expand Down Expand Up @@ -69,7 +71,7 @@ const getStylesButton = (props: ButtonWrapperProps) => {
case 'outline':
return css`
background-color: transparent;
border: 2px solid ${colorButton};
border: ${borderWidthSm}px solid ${colorButton};
&:hover {
background-color: ${colorButton}10;
}
Expand All @@ -89,23 +91,20 @@ const getStylesButton = (props: ButtonWrapperProps) => {
const sizeButton = {
normal: css`
min-height: 2.25rem;
font-size: 16px;
`,
medium: css`
min-height: 2.75rem;
font-size: 16px;
`,
large: css`
min-height: 3.25rem;
font-size: 18px;
`,
};

export const Touchable = styled(TouchableComponent)<ButtonWrapperProps>`
${getStylesButton}
${({ size }) => !!size && sizeButton[size]}
width: ${({ fullWidth }) => (!!fullWidth ? '100%' : undefined)};
padding: 12px;
padding: ${spacingSm}px;
cursor: ${isDisabled('not-allowed', 'pointer')};
flex-direction: row;
align-items: center;
Expand Down Expand Up @@ -184,7 +183,6 @@ export const ContentWrapper = styled.div<ButtonWrapperProps>`

export const TextButton = styled(Typography)`
letter-spacing: 0.4px;
font-size: 16px;
font-style: normal;
font-weight: 600;
line-height: 100%;
Expand Down

0 comments on commit f821982

Please sign in to comment.