antd-theme-generator
Advanced tools
Comparing version 1.1.8 to 1.1.9
{ | ||
"name": "antd-theme-generator", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "This a script to generate color specific styles less file and which you can use to change theme dynamically in browser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,2 +17,3 @@ # antd-theme-generator | ||
outputFilePath: path.join(__dirname, './public/color.less') // if provided, file will be created with generated less/styles | ||
customColorRegexArray: [/^fade\(.*\)$/], // An array of regex codes to match your custom color variable values so that code can identify that it's a valid color. Make sure your regex does not adds false positives. | ||
} | ||
@@ -27,4 +28,6 @@ | ||
``` | ||
## Note: include all color variables in `varFile` that you want to change dynamically and assign them unique color codes. Don't assign same color to two or more variables and don't use `#fff`, `#ffffff`, `#000` or `#000000`. If you still want white or black color as default, slightly change it e.g. `#fffffe` or `#000001` which will not replace common background colors from other components. | ||
## Note: include all color variables in `varFile` that you want to change dynamically and assign them unique color codes. Don't assign same color to two or more variables and don't use `#fff`, `#ffffff`, `#000` or `#000000`. If you still want white or black color as default, slightly change it e.g. `#fffffe` or `#000001` which will not replace common background colors from other components. | ||
## If you variables have some custom color code like `fade(@primary-color, 20%)` or something that does not matches with common regex to match a valid color then add your custom regex array as `customColorRegexArray` variable in options object while executing `generateTheme(options)`. | ||
Add following lines in your main html file | ||
@@ -31,0 +34,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30095
51