Skip to content

Instantly share code, notes, and snippets.

@jung-han
Created November 7, 2022 22:20
Show Gist options
  • Save jung-han/ee5a1f07e0cfd76c5350cb0f8b7f094d to your computer and use it in GitHub Desktop.
Save jung-han/ee5a1f07e0cfd76c5350cb0f8b7f094d to your computer and use it in GitHub Desktop.
// 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