| 1 | const 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 | |
| 23 | const getStyles = (options) => |
| 24 | ` |
| 25 | ${genSections(options)} |
| 26 | `; |
| 27 | export default getStyles; |
| 28 | |