cx-theme-material-dark
v26.1.0
Published
Material Dark theme CSS styles for Cx applications
Downloads
89
Readme
Material Dark Theme
This is a package that enables Material Dark like appearance for the CxJS framework. Take a look at the theme preview and compare it to the other themes here.
Usage
In order to use the theme, install its npm package:
npm install cx-theme-material-darkImport theme's JavaScript. If you want material design label and validation behavior, do the following:
import { enableMaterialLabelPlacement, enableMaterialHelpPlacement } from "cx-theme-material";
enableMaterialLabelPlacement();
enableMaterialHelpPlacement();otherwise, just import the theme:
import "cx-theme-material-dark";Then, import theme styles from the package by adding the following snippet to one of your SCSS files:
// theme variables can be overridden here
@import "~cx-theme-material-dark/src/variables";
// theme state-style-maps can be overridden here, before importing css
@import "~cx-theme-material-dark/src/index";
// add custom CSS hereIf you are using cx-scaffold to start, be sure to replace the line under the comment inside config/webpack.config.js:
//add here any ES6 based library
include: /[\\\/](app|cx|cx-react)[\\\/]/,with the following:
//add here any ES6 based library
include: /[\\\/](app|cx|cx-react|cx-theme-material-dark)[\\\/]/,Finally, don't forget to add material icons to your project, as described here.
To learn more about Cx styling and how to customize it, click here.
