Interactive states
import { html, atom, renderApp } from 'mates';
import { Rating } from 'mates-ui';
const App = () => {
const ratingA = atom(0);
const ratingB = atom(2);
return () => html`<x-col gap="16px">
${Rating({ value: ratingA(), min: 0, max: 5, clearable: true, onChange: v => ratingA.set(v) })}
${Rating({ value: ratingB(), min: 0, max: 5, showValue: true, onChange: v => ratingB.set(v) })}
${Rating({ value: 4, max: 5, readOnly: true, showValue: true })}
${Rating({ value: 3, max: 5, disabled: true })}
</x-col>`;
};
renderApp(App, document.getElementById('app'));