({value, setfn})
| 215 | }; |
| 216 | |
| 217 | export function SwitchValue({value, setfn}) { |
| 218 | const onclick = ev => setfn(!value); |
| 219 | const bg = !!value ? 'bg-blue-600' : 'bg-gray-200'; |
| 220 | const tr = !!value ? 'translate-x-5' : 'translate-x-0'; |
| 221 | return html` |
| 222 | <button type="button" onclick=${onclick} class="${bg} inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-0 ring-0" role="switch" aria-checked=${!!value}> |
| 223 | <span aria-hidden="true" class="${tr} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 focus:ring-0 transition duration-200 ease-in-out"></span> |
| 224 | </button>`; |
| 225 | }; |
| 226 | |
| 227 | export function Setting(props) { |
| 228 | let input = TextValue; |
nothing calls this directly
no outgoing calls
no test coverage detected