@skanska/branded-components
v0.0.4
Published
Skanska Branded Component Library
Downloads
21
Readme
Skanska Branded Components
This library is intended for Skanska to be able to brand web applications according to the brand guidelines.
Using this library
Script tag
- Put a script tag similar to this
<script type='module' src='https://unpkg.com/[email protected]/dist/my-component.esm.js'></script>in the head of your index.html - Then you can use the element anywhere in your template, JSX, html, etc.
Node Modules
- Run
npm install my-component --save - Put a script tag similar to this
<script type='module' src='node_modules/my-component/dist/my-component.esm.js'></script>in the head of your index.html - Then you can use the element anywhere in your template, JSX, html, etc.
In a stencil-starter app
- Run
npm install my-component --save - Add an import to the npm packages
import my-component; - Then you can use the element anywhere in your template, JSX, html, etc.
In a frontend framework app
- Run
npm install my-component --save - Add an import to the index.js file:
import { defineCustomElements } from '@skanska/branded-components/dist/loader';- Bind the elements at the bottom of the index.js file:
defineCustomElements(window);- Then you can use the element anywhere in your project, JSX, etc.
