Created
November 7, 2022 22:20
-
-
Save jung-han/ee5a1f07e0cfd76c5350cb0f8b7f094d to your computer and use it in GitHub Desktop.
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
// colors.ts | |
export const colors = { | |
primary: "#0d6efd", | |
border: "#ddd", | |
/* ... */ | |
}; | |
// MyComponent.tsx | |
function MyComponent({ fontSize }) { | |
return ( | |
<p | |
css={{ | |
color: colors.primary, | |
fontSize, | |
border: `1px solid ${colors.border}`, | |
}} | |
> | |
... | |
</p> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment