-
npm install --legacy-peer-deps --omit=optional --no-shrinkwrap
-
npm pack
Run these commands before npm install.
Put the modusoperandi-licit-custom-styles-0.1.0.tgz file in your project location, open command prompt and run:
- npm install modusoperandi-licit-custom-styles-0.1.0.tgz
Include plugin in licit component
-
import CustomstylePlugin
-
add CustomstylePlugin instance in licit's plugin array
import {CustomstylePlugin} from '@modusoperandi/licit-custom-styles';
Expecting two parameters in CustomstylePlugin and the parameters are:
1.A CustomStyleRuntime to configure the style service to licit expects methods like saveStyle(),getStyles(),renameStyle() and removeStyle(). Please refer *licit\client\CustomStyleRuntime.js* for getting more detailed idea.
2. A boolean flag that indicating the custom style numbering should be displayed or not for the document. For hide numbering pass true.
import CustomStyleRuntime from './CustomStyleRuntime';
const styleRuntime = new CustomStyleRuntime();
const plugins = [new CustomstylePlugin(styleRuntime,false)]
ReactDOM.render(<Licit docID={''} plugins={plugins}/>)
- import the customstyle.css file in the default global CSS file (src\styles.scss) of the angular project.
@import "~@modusoperandi/licit-custom-styles/customstyle.css";