preact-touchable-dock
A touch and drag and droppable dock for single page web applications.
Mobile | Simulated Mobile |
---|---|
Installation
$ npm i --save preact-touchable-dock# or $ yarn add preact-touchable-dock
Usage
Touchable Dock Demo
Notes
TouchableDock
inserts inline classes via JSS. This allows users to customize its style by adjusting classes like.touchableDock
and.touchableDockHandle
.- Changing the dock's stage works by calling the
setStage
method through a ref. Possible values are["hide", "hint", "full"]
. props.onClose
allows to listen for close events emitted from the dock.
Contributing
$ git clone git@github.com:TimDaub/preact-touchable-dock.git$ cd preact-touchable-dock$ npm i$ npm run dev
Changelog
0.3.5
- Bug fix: Don't allow scrolling of body in
stage === full
0.3.4
- Added
onClick
prop
0.3.3
- Forgot to update the build lol
0.3.2
- Bug fix:
Uncaught ReferenceError: pageY is not defined
0.3.1
- Bug fix: Allow other components to receive touch and mouse movement event by
conditionally applying
evt.preventDefault
- Bug fix: Allow adjusting dock's height in scrolled position
0.3.0
- Unmount children when component is in
stage === "hide"
to allow usage ofcomponentWillUnmount
in child
0.2.2
- Add
onClose
prop to component for listening to close events.
0.2.1
- Add closing action button
0.2.0
- Deprecate changing
stage
through props and allow only through new method calledsetStage
0.1.0
- Deliver CSS classes as JS-generated inline classes using JSS
0.0.1
- Initial release