import React from "react" ; import "./Switch.scss" ; import { browser } from "webextension-polyfill-ts" ; type Props = { on : boolean ; } ; export const Switch = props => { const { on , className = "" , ... buttonProps } = props ; const buttonClassName = [ className , "switch__button" , on ? "switch__button--on" : "switch__button--off" ] . join ( " " ) ; return ( < div className = "switch" > < input className = "switch__input" type = "checkbox" checked = { on } onChange = { ( ) => { } } /> < button className = { buttonClassName } aria - label = { browser . i18n . getMessage ( 'toggle' ) } type = "button" { ... buttonProps } /> < /div>); } ;