synthing

a waveform sequencing synth on the web
Log | Files | Refs | Submodules

index.js (448B)


      1 import { h } from 'preact';
      2 import helpers from '../helpers';
      3 import './style.css';
      4 
      5 const handleToggle = (update, checked, ev) => {
      6     update(!checked);
      7 }
      8 
      9 export default (props) =>  {
     10     return (
     11         <div
     12             class={`${props.class} checkbox`}
     13             onClick={helpers.partial(handleToggle, props.update, props.checked)}
     14         >
     15             {props.checked ? <div class="checkbox-circle"></div> : null }
     16         </div>
     17     );
     18 }