🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

hit-lib

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hit-lib

## Install ``` npm install --save-dev hit-lib

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

HIT Lib

Install

npm install --save-dev hit-lib

or

yarn add -D hit-lib

Usage in Vue Project

In main.js:

import hitLib from 'hit-lib';
Vue.use(hitLib);

Components

Storybook

$ yarn storybook

=> Open Storybook with Component Examples and Usages

Plugins

Alert

In App.vue:

<hit-alert></hit-alert>

Alert Trigger

Global Trigger Functions:

this.$Alert.success('Message');
this.$Alert.info('Message');
this.$Alert.warning('Message');
this.$Alert.error('Message');

Alert Params

Speed in ms:

let speed = 20000;
this.$Alert.success('Message', speed);
this.$Alert.warning('Message', speed);
this.$Alert.error('Message', speed);

Theme

In main.js:

## Styles

    Vue.use(hitLib, {
      styles: {
        primary: '#4286f4',
        primaryLighten: '',
        primaryDarken: '',

        secondary: '#ed40d8',
        secondaryLighten: '',
        secondaryDarken: '',

        lighten: 0.15,
        darken: -0.15,

        white: '#FFF',
        disabled: '#999999',

        black: '#313647',
        gray1: '#F2F2F2',
        gray2: '#DDDDDD',
        gray3: '#999999',
        gray4: '#666666',

        gridBorder: '#999999',

        error: '#dc3545',
        warning: '#ffc107',
        success: '#28a745',
        info: '#17a2b8',
      }
    });

Programatically Theming

let theme = {
    styles: {
        primary: '#4286f4',
        primaryLighten: '',
        primaryDarken: '',
        
        secondary: '#ed40d8',
        secondaryLighten: '',
        secondaryDarken: '',
        
        lighten: 0.15,
        darken: -0.15,
        
        white: '#FFF',
        disabled: '#999999',
        
        black: '#313647',
        gray1: '#F2F2F2',
        gray2: '#DDDDDD',
        gray3: '#999999',
        gray4: '#666666',
        
        gridBorder: '#999999',
        
        error: '#dc3545',
        warning: '#ffc107',
        success: '#28a745',
        info: '#17a2b8',
    } 
};

this.$Theme.updateStyle(theme);



* If darken or primaryLighten/primaryDarken and 
secondaryLighten/secondaryDarken colors are not 
specified as in example above, It will use the 
lighten/darken percentage. 

FAQs

Package last updated on 03 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts