d-component-styles

1.0.0 • Public • Published

d-component-styles

A Derby plugin for adding the possibility to define (links to) styles on a component level

How to use

Adds the possibility to add a style-property on your Component prototype with a link to a stylesheet (or .styl, etc.), which will automatically be added when the component is added. I.e. it works very similar to defining the view on the component. E.g.

// When this component is loaded through app.component('./mycomponent/index.js'), the stylesheet in './mycomponents/styles/index.styl' will automatically be added
function MyComponent () {}
 
MyComponent.prototype.style = __dirname + '/styles'

Readme

Keywords

Package Sidebar

Install

npm i d-component-styles

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • cjblomqvist