1.0.0 • Published 7 years ago
ws-icon v1.0.0
ws-icon
This extension is simple UI web component:
- It allows customize icons by applying appropriate CSS-styles using selector (ws-icon svg).
- Icon is set by "src" attribute of the component (e.g. src="path/to/icon.svg#id). Path has to include reference to id of svg element from sprite (or id of specific shape/path).
Styled example
![]()
Usage
<ws-icon src="path/to/sprite.svg#iconId"></ws-icon>
<style>
ws-icon svg{
/*any styles here*/
}
</style>Development
Install dependencies:
npm installFor build extension:
npm run buildSandbox
sandbox is environment for developing extension.
dev server is run on http://0.0.0.0:8080. It's just static server
which looks on sandbox and build folders and returns assets.
For run dev server:
npm run dev:serveindex.js contains code that is necessary for extension usage and is built in
sandbox/build/index.js file by webpack.
watch
For build extension and run watch task:
npm run build:watchIt's run build of extension, build of sandbox client and watches files inside
src and sandbox folder, on any change - rebuilds all.
1.0.0
7 years ago