1.1.0 • Published 7 years ago

deku-rating v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

deku-rating

Rating component for deku

Install

$ npm install --save deku-rating

Usage

import Rating from 'deku-rating';

export function render({state}, setState) {
	const {value} = state;
	const icon = <div>&#9733;</div>;

	function onRate(prevValue, nextValue) {
		setState({value: nextValue});
	}

	return <Rating icon={icon} max='10' value={value} onRate={onRate}/>;
}

License

MIT © Andreas Gillström