tsConversion: flowchartStyles

This commit is contained in:
Sidharth Vinod 2022-08-21 01:21:47 +05:30
parent 896154d89f
commit fab9688135
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
1 changed files with 18 additions and 22 deletions

View File

@ -1,25 +1,21 @@
/** /** Returns the styles given options */
* Returns the styles given options export interface FlowChartStyleOptions {
* arrowheadColor: string;
* @param {{ border2: string;
* fontFamily: string; clusterBkg: string;
* nodeTextColor: string; clusterBorder: string;
* textColor: string; edgeLabelBackground: string;
* titleColor: string; fontFamily: string;
* mainBkg: string; lineColor: string;
* nodeBorder: string; mainBkg: string;
* arrowheadColor: string; nodeBorder: string;
* lineColor: string; nodeTextColor: string;
* edgeLabelBackground: string; tertiaryColor: string;
* clusterBkg: string; textColor: string;
* clusterBorder: string; titleColor: string;
* tertiaryColor: string; }
* border2: string;
* }} options const getStyles = (options: FlowChartStyleOptions) =>
* The options for the styles
* @returns {string} The resulting styles
*/
const getStyles = (options) =>
`.label { `.label {
font-family: ${options.fontFamily}; font-family: ${options.fontFamily};
color: ${options.nodeTextColor || options.textColor}; color: ${options.nodeTextColor || options.textColor};