ng2-styled-directive
Angular 2 "styled" directive
Demo: http://bogdan1975.github.io/styled/
Dependencies
- Angular 2
npm install angular2
Install
You can get it on npm.
npm install ng2-styled-directive
Usage
Attributes
styleBlock
- string | string[]
The value of this attribute will be applied to "styled" DOM-element. Directive adds unique attribute to element and incapsulates style by this attribute.
stylePath
- string
skin
- string
If 'styled' directive is applied to component that implements 'ISkinable'
interface, you can use skins that setted by getStyledConfig()
method of this copmonent.
getStyledConfig()
method must return IStyledConfig
interface object.
Example:
; getStyledConfig:IStyledConfig
If skin named as 'default'
provided by getStyledConfig() method of styled component, it will applied automatically. If you don't want any skin, set 'none'
as skin name.
Interfaces
ISkinable
IStyledConfig
IConfigItem