1.3.29 • Published 7 years ago
sitekit-extensions v1.3.29
Sitekit extensions
Installation
If using yarn type:
yarn add sitekit-extensionsIf using npm type:
npm i sitekit-extensions -addUsage
To begin usage just import the extensions you want to use and add them into your widgets use: [] property
An example of using the reactive and knockout widgets:
import { reactive, mousemove } from 'sitekit-extensions'
export default function (Site, $){
Site.widget('mousepos', {
use: [
reactive(),
mousemove(),
]
onMousemove({x, y}){
this.setState({
pos: {x, y}
})
}
react(){
this.changed('pos', (prevState, newState, self) => {
this.element.toggleClass('right', this.state.x > window.innerWidth / 2)
})
/* or use no namespace to react to all props */
this.changed((prevState, newState, self) => {
this.element.toggleClass('left', this.state.x < window.innerWidth / 2)
})
}
})
}1.3.29
7 years ago
1.3.28
7 years ago
1.3.27
7 years ago
1.3.26
7 years ago
1.3.25
7 years ago
1.3.22
8 years ago
1.3.21
8 years ago
1.3.20
8 years ago
1.3.2
8 years ago
1.3.13
8 years ago
1.2.13
8 years ago
1.2.12
8 years ago
1.2.11
8 years ago
1.2.9
8 years ago
1.2.8
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago