0.0.4 • Published 2 years ago

@skanska/branded-components v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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/my-component@0.0.1/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.
0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago