scania-theme

1.1.3 • Public • Published

npm version Github release GitHub Workflow Status

Scania Theme

Scania theme is a package to style Scania looks and feel in the Corporate UI 4.0 setup.

Installation

NPM package

Install scania-theme package by running the command below.

npm i scania-theme

Import theme in the project and use it with addTheme function from corporate-ui.

import { defineCustomElements, addTheme } from 'corporate-ui'; 
import { theme as scania } from 'scania-theme'; 
 
defineCustomElements(); 
addTheme(scania);
CDN link

Add link to the script by adding the following to the head element. Make sure to include scania-theme script BEFORE the corporate-ui script.

<script src="https://static.scania.com/build/global/themes/scania/1.x/scania-theme.js"></script>
<script src="https://static.scania.com/build/global/4.x/corporate-ui.js"></script>

Replace x with available releases.

Setup in project

Initialize the theme with the c-theme component. Set global attribute to true in order to enable bootstrap styling.

<c-theme name="scania" global="true"></c-theme>

Setup local development

  1. Clone scania-theme repository
git clone https://github.com/scania/scania-theme.git
  1. Download and install node.js: https://nodejs.org/en/
  2. If you're behind a firewall, CONFIGURE THE PROXY
  3. From the scania-theme folder, run npm i to install package dependencies
  4. Start the local setup by running npm start
  5. Scania theme scripts will be served on http://localhost:1338/scania-theme.js

License

The Scania brand identity and the interaction patterns found in this repository are not available on an open source basis. Although we have great freedom to make improvements and new components, some changes to interaction patterns and use of colours etc may not be approved.

Readme

Keywords

none

Package Sidebar

Install

npm i scania-theme

Weekly Downloads

182

Version

1.1.3

License

ISC

Unpacked Size

9.55 MB

Total Files

64

Last publish

Collaborators

  • elaelation
  • mmexvr