mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
28 lines
548 B
JavaScript
28 lines
548 B
JavaScript
const genSections = (options) => {
|
|
let sections = '';
|
|
|
|
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
|
|
sections += `
|
|
.section-${i} rect {
|
|
fill: ${options['cScale' + i]};
|
|
stroke: ${options['cScalePeer' + i]};
|
|
stroke-width: 4;
|
|
}
|
|
.section-${i} rect.inverted {
|
|
fill: ${options['cScaleInv' + i]};
|
|
}
|
|
.section-${i} text {
|
|
fill: ${options['cScaleLabel' + i]};
|
|
}
|
|
|
|
`;
|
|
}
|
|
return sections;
|
|
};
|
|
|
|
const getStyles = (options) =>
|
|
`
|
|
${genSections(options)}
|
|
`;
|
|
export default getStyles;
|