Created
August 30, 2021 00:04
-
-
Save maecapozzi/31fd3a036449a9bd6d178e9df7f8f380 to your computer and use it in GitHub Desktop.
design tokens - second layer of abstraction
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
import colors from './colors.ts'; | |
const baseTheme = { | |
colors: { | |
// primary is a semantic name. | |
primary: colors.blue100, | |
secondary: colors.gray:100, | |
} | |
} | |
const brandATheme = { | |
...baseTheme | |
} | |
// A brand theme can extend other themes | |
// and then override some aspects when needed | |
const brandBTheme = { | |
...baseTheme, | |
colors: { | |
primary: colors.blue200, | |
secondary: colors.gray:200, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment