-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates tags to use the correct color tokens.
- Loading branch information
1 parent
1fedce5
commit c6bc852
Showing
7 changed files
with
116 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,58 @@ | ||
import { variant } from '@codecademy/gamut-styles'; | ||
import { states, variant } from '@codecademy/gamut-styles'; | ||
|
||
import { ButtonSelectors } from '../ButtonBase/ButtonBase'; | ||
|
||
export const tagLabelPadding = 8; | ||
export const tagLabelFontSize = 14; | ||
export const tagBorderRadius = '4px'; | ||
|
||
export const tagBaseStyles = { | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
borderRadius: tagBorderRadius, | ||
borderRadiusLeft: `${tagBorderRadius}`, | ||
display: 'flex', | ||
height: '24px', | ||
width: 'fit-content', | ||
justifyContent: 'center', | ||
maxWidth: '100%', | ||
width: 'fit-content', | ||
}; | ||
|
||
export const colorVariants = variant({ | ||
defaultVariant: 'default', | ||
base: tagBaseStyles, | ||
base: { | ||
...tagBaseStyles, | ||
color: 'background', | ||
}, | ||
variants: { | ||
default: { | ||
color: 'text', | ||
bg: 'secondary', | ||
}, | ||
grey: { | ||
color: 'white', | ||
bg: 'text-secondary', | ||
}, | ||
}, | ||
}); | ||
|
||
export const tagBg = { | ||
light: { | ||
grey: 'navy-500', | ||
default: 'navy-900', | ||
}, | ||
dark: { | ||
grey: 'white-500', | ||
default: 'white', | ||
export const tagWrapperStates = states({ | ||
readOnly: { | ||
borderRadius: tagBorderRadius, | ||
}, | ||
} as const; | ||
}); | ||
|
||
export const dismissSharedStyles = { | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
display: 'flex', | ||
height: '100%', | ||
justifyContent: 'center', | ||
minWidth: '24px', | ||
}; | ||
|
||
export const iconButtonOverrides = { | ||
// These pseudo elements add an extra slightly opaque border on hover/focus | ||
'::before, ::after': { | ||
display: 'none', | ||
}, | ||
// This removes a black solid outline on focus | ||
[ButtonSelectors.OUTLINE_FOCUS_VISIBLE]: { | ||
opacity: 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters