0.1.0 • Published 6 years ago

@rebelcode/vc-toggleable v0.1.0

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

Toggleable Component

npm (scoped)

Usage

<toggle :toggleable="toggleable" inline-template>
    <span @click="setState(!isOn)">
        {{ isOn ? 'On' : 'Off' }}
    </span>
</toggle>

Toggleable component implements logic responsible for getting Toggle model state and setting it. So consumer needs to use inline-template. Inside that template next functions and variables available:

setState({boolean} newState) - set toggle model state

isOn - is toggle model state set to true

Also, toggleable property receives object, instance of FunctionalToggleable

Developing

Run npm install to install all dev dependencies.

Here is available npm commands.

Build library while developing

npm run dev

Build library for production

npm run production

Run e2e tests

npm run e2e
0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago