33import type { StyledButtonProps } from './button.types' ;
44
55import { Link } from '@/components/elements/link' ;
6- import { css , screens , styled } from '@/styles' ;
6+ import { css , screens , styled , fontSizes , fontWeight } from '@/styles' ;
77
88const base = css < StyledButtonProps > `
99 position: relative;
@@ -13,8 +13,8 @@ const base = css<StyledButtonProps>`
1313 height: fit-content;
1414 outline: none;
1515 border: 0;
16- font-size: ${ ( { theme , $small } ) => theme . fontSizes . button [ $small ? 'small' : 'default' ] } ;
17- font-weight: ${ ( { theme } ) => theme . fontWeight . medium } ;
16+ font-size: ${ ( { $small } ) => fontSizes . button [ $small ? 'small' : 'default' ] } ;
17+ font-weight: ${ fontWeight . medium } ;
1818 text-decoration: none;
1919 line-height: 1;
2020 border-radius: 12px;
@@ -39,9 +39,9 @@ const base = css<StyledButtonProps>`
3939 switch ( props . $variant ) {
4040 case 'primary' :
4141 return css `
42- color: ${ ( { theme } ) => theme . colors . text . alwayWhite } ;
43- background: ${ ( { theme } ) => theme . colors . orangeGradient } ;
44- border: 1px solid ${ ( { theme } ) => theme . colors . cinnarbarRed } ;
42+ color: var(-- text-always-white) ;
43+ background: var(--orange-gradient) ;
44+ border: 1px solid var(--cinnabar-red) ;
4545 padding: ${ props . $small ? '16px 24px' : '19px 24px' } ;
4646 box-shadow:
4747 0px 2px 1px 0px rgba(255, 255, 255, 0.15) inset,
@@ -59,7 +59,7 @@ const base = css<StyledButtonProps>`
5959 ${ ( ) =>
6060 ! props . $withBorder &&
6161 `
62- border: 1px solid ${ props . theme . colors . text . white } ;
62+ border: 1px solid var(-- text- white) ;
6363 ` }
6464 }
6565 }
@@ -90,11 +90,11 @@ const base = css<StyledButtonProps>`
9090
9191 case 'secondary' :
9292 return css `
93- color: ${ ( { theme } ) => theme . colors . text . lightGrey } ;
94- background-color: ${ ( { theme } ) => theme . colors . button . secondaryDefault } ;
93+ color: var(-- text-light-grey) ;
94+ background-color: var(-- button-secondary-default) ;
9595 padding: ${ props . $small ? '16px 24px' : '20px 24px' } ;
9696 box-shadow:
97- 0 0 0 1px ${ ( { theme } ) => theme . colors . button . border } ,
97+ 0 0 0 1px var(-- button- border) ,
9898 0px 0px 8px 0px rgba(230, 232, 242, 0.05);
9999
100100 @media (min-width: ${ screens . md } ) {
@@ -103,7 +103,7 @@ const base = css<StyledButtonProps>`
103103 ${ ( ) =>
104104 ! props . $isDropdown &&
105105 `
106- box-shadow: 0 0 0 1px ${ props . theme . colors . text . lightGrey } ;
106+ box-shadow: 0 0 0 1px var(-- text-light-grey) ;
107107 ` }
108108 }
109109 }
@@ -112,19 +112,19 @@ const base = css<StyledButtonProps>`
112112 ${ ( ) =>
113113 ! props . $isDropdown &&
114114 `
115- border: 1px solid ${ props . theme . colors . text . lightGrey } ;
115+ border: 1px solid var(-- text-light-grey) ;
116116 box-shadow:
117117 0px 0px 8px 0px rgba(230, 232, 242, 0.05),
118118 0px 0px 0px 8px rgba(50, 52, 59, 0.6);
119119 ` }
120120 }
121121
122122 &:active {
123- background-color: ${ ( { theme } ) => theme . colors . inkGrey } ;
123+ background-color: var(--ink-grey) ;
124124 ${ ( ) =>
125125 ! props . $isDropdown &&
126126 `
127- border: 1px solid ${ props . theme . colors . text . lightGrey } ;
127+ border: 1px solid var(-- text-light-grey) ;
128128 ` }
129129 }
130130 }
@@ -154,4 +154,4 @@ export const StyledButtonWrapper = styled.div`
154154 justify-content: start;
155155 width: fit-content;
156156 }
157- ` ;
157+ ` ;
0 commit comments