0.5.65 • Published 5 years ago

@striven-erp/striven-tooltip v0.5.65

Weekly downloads
17
License
MIT
Repository
github
Last release
5 years ago

Striven Tooltip

ℹ Tooltip UI used in the Striven ERP System

Getting Started

Install the Striven Tooltip

npm install @striven-erp/striven-tooltip

Initialize an instace of StrivenTooltip

import { StrivenTooltip } from '@striven-erp/striven-tooltip';

const stip = new StrivenTooltip('This is a tip', tooltipElement, { icon: true  });

Knockout

import ko from 'knockout';
import { KoStrivenTooltip } from '@striven-erp/striven-tooltip';

new KoStrivenTooltip(ko);

Template the binding

Attach the binding to the element that you want StrivenTooltip to be initialized with.

<span data-bind="tooltip: tooltipConfig" />

Example View Model

function AppViewModel() {
  this.tooltipConfig = {
    tip: 'This is a tooltip!',
    icon: true
  }
}

Build and Use

$ npx webpack --mode=production
$ mv dist/striventooltips.js ~/path/to/project

Properties

PropertyTypeDefaultDescription
iconBooleanfalseWhether to add the default icon or not
onShowFunctionnullMethod called when the tooltip is shown
onHideFunctionnullMethod called when the tooltip is hidden

Methods

MethodReturnsDescription
showTooltipNothingShows the tooltip
hideToolipNothingHides the tooltip
setTip(String)NothingSets the tip property and changes the content of the tooltip
0.5.65

5 years ago

0.5.64

5 years ago

0.5.63

5 years ago

0.5.61

5 years ago

0.5.62

5 years ago

0.5.6

5 years ago

0.5.4

5 years ago

0.5.5

5 years ago

0.5.3

5 years ago

0.5.2

6 years ago

0.5.0

6 years ago

0.5.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago