-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add core button variants #190
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,7 @@ export const Icon: FunctionComponent<IconProps & BoxProps> = ({ | |
as={InlineSVG} | ||
src={icons[type]} | ||
width={width} | ||
fill={get(theme.colors, (fill as keyof Theme['colors']) as string) || fill} | ||
sx={{ fill: get(theme.colors, (fill as keyof Theme['colors']) as string) || fill }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reason for this? |
||
{...props} | ||
/> | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,8 @@ const COLORS = { | |
WHITE: '#ffffff', | ||
GREY_LIGHT: '#d8d8d8', | ||
GREY_ATHENS: '#e8eaed', | ||
GREY_SECONDARY: '#b5bfc7' | ||
GREY_SECONDARY: '#b5bfc7', | ||
WARNING_ORANGE: '#fa873f' | ||
}; | ||
|
||
const breakpoints: string[] & { | ||
|
@@ -76,6 +77,8 @@ export const theme = { | |
spinner: '#a086f7', | ||
loadingSpinner: '#7c9ec3', | ||
|
||
warning: COLORS.WARNING_ORANGE, | ||
|
||
background: { | ||
muted: '#f6f8fa' | ||
}, | ||
|
@@ -93,6 +96,9 @@ export const theme = { | |
}, | ||
inverted: { | ||
hover: '#007896' | ||
}, | ||
warning: { | ||
hover: COLORS.WHITE | ||
} | ||
}, | ||
|
||
|
@@ -299,6 +305,36 @@ export const theme = { | |
} | ||
} | ||
}, | ||
warning: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add this to Storybook? |
||
cursor: 'pointer', | ||
background: '', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
color: 'primary', | ||
fontSize: 2, | ||
fontFamily: 'body', | ||
padding: '0.625rem 2.125rem', | ||
borderRadius: 'small', | ||
borderWidth: '0.125rem', | ||
borderStyle: 'solid', | ||
borderColor: 'primary', | ||
transition: 'color 0.12s ease 0s, background 0.12s ease 0s, box-shadow 0.12s ease 0s', | ||
'&:hover': { | ||
backgroundColor: 'button.warning.hover', | ||
color: 'text.inverted' | ||
}, | ||
'&:focus': { | ||
boxShadow: 'button', | ||
outline: 'none' | ||
}, | ||
'&:disabled': { | ||
cursor: 'default', | ||
borderColor: 'button.primary.disabled', | ||
color: 'button.primary.disabled', | ||
'&:hover': { | ||
background: 'none', | ||
color: 'button.primary.disabled' | ||
} | ||
} | ||
}, | ||
clear: { | ||
cursor: 'pointer', | ||
background: 'none', | ||
|
@@ -311,6 +347,12 @@ export const theme = { | |
'&:hover': { | ||
transform: 'scale(1.05)' | ||
} | ||
}, | ||
basic: { | ||
cursor: 'pointer', | ||
background: 'none', | ||
border: 'none', | ||
p: 0 | ||
} | ||
}, | ||
variants: { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.