1.4.6 • Published 11 months ago

@atomify/kit v1.4.6

Weekly downloads
93
License
MIT
Repository
github
Last release
11 months ago

@atomify/kit

Utility kit to use with Atomify hooks components.

Installation

npm i @atomify/kit

Configuration

Atomify hooks is made for the modern browsers. Its recommended in legacy browsers to add the following while compiling to ES5 with Babel: exclude: /node_modules\/(?!@atomify)/

Its recommended to use Web Components polyfill to support everything from Web Components spec in legacy browsers.

Utilities

Set of utilities that are shipped with the @atomify/kit:

NameReadme
StoreREADME
InviewREADME
LoadableREADME
Media QueryREADME

Hooks

Set of hooks that are shipped with the @atomify/kit:

useClassname

const classes = useClassname({ hidden: true, "has-item": !![].length });

// Toggle classes on the div
classes.toggle('hidden');

// Add classes to the div
classes.add('another-class');

// Check if a class exists
classes.contains('has-items');

<div class={classes}>hello{ test.current }</div>

useStore

useStore is a small wrapper around the Store utility

const [state, subscribe, prevState] = useStore<StateType>(store);

// Returns the initialState
console.log(state);

subscribe(() => {
    // Logs the previousstate
    console.log(prevstate);
});

TODO

  • Add documentation for component.
1.4.6

11 months ago

1.4.5

1 year ago

1.4.3

1 year ago

1.4.2

3 years ago

1.3.10

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.9

3 years ago

1.3.7

3 years ago

1.3.8

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.2.0-alpha.0

3 years ago

1.1.15

4 years ago

1.1.14

4 years ago

1.1.13

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.0.0

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago