deku-rating

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i deku-rating

Weekly Downloads

3

Version

1.1.0

License

MIT

Last publish

Collaborators

  • gillstrom