548 B28 lines
Blame
1const genSections = (options) => {
2 let sections = '';
3
4 for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
5 sections += `
6 .section-${i} rect {
7 fill: ${options['cScale' + i]};
8 stroke: ${options['cScalePeer' + i]};
9 stroke-width: 4;
10 }
11 .section-${i} rect.inverted {
12 fill: ${options['cScaleInv' + i]};
13 }
14 .section-${i} text {
15 fill: ${options['cScaleLabel' + i]};
16 }
17
18 `;
19 }
20 return sections;
21};
22
23const getStyles = (options) =>
24 `
25 ${genSections(options)}
26`;
27export default getStyles;
28