States
import { html, atom, renderApp } from 'mates';
import { Switch } from 'mates-ui';
const App = () => {
const notifs = atom(true);
const darkMode = atom(false);
return () => html`<x-col gap="10px">
${Switch({ label: "Notifications", atom: notifs })}
${Switch({ label: "Dark mode", atom: darkMode, onIcon: "dark_mode", offIcon: "light_mode" })}
${Switch({ label: "Disabled off", disabled: true })}
${Switch({ label: "Disabled on", disabled: true, checked: true })}
</x-col>`;
};
renderApp(App, document.getElementById('app'));