I finally figured it out, so here is how you can do it, at least if you use React.
You need to define the variables in one file and export them.
// Variables.js export const FONTSIZE_5 = '20px';
Then you need to import these variables into each component file.
// Button.js import * as palette from './Variables.js';
Then you can use variables in your stylized components, for example:
const Button = styled.button` font-size: ${palette.FONTSIZE_5}; `;
colmtuite
source share