()
| 64 | } |
| 65 | |
| 66 | export function ErrorMessageExample() { |
| 67 | const [checked, setChecked] = createSignal(false); |
| 68 | |
| 69 | return ( |
| 70 | <Switch |
| 71 | class={style.switch} |
| 72 | checked={checked()} |
| 73 | onChange={setChecked} |
| 74 | validationState={!checked() ? "invalid" : "valid"} |
| 75 | > |
| 76 | <div class="flex flex-col items-start mr-2"> |
| 77 | <Switch.Label class={style.switch__label}>Airplane mode</Switch.Label> |
| 78 | <Switch.ErrorMessage class={style["switch__error-message"]}> |
| 79 | You must enable airplane mode. |
| 80 | </Switch.ErrorMessage> |
| 81 | </div> |
| 82 | <Switch.Input class={style.switch__input} /> |
| 83 | <Switch.Control class={style.switch__control}> |
| 84 | <Switch.Thumb class={style.switch__thumb} /> |
| 85 | </Switch.Control> |
| 86 | </Switch> |
| 87 | ); |
| 88 | } |
| 89 | |
| 90 | export function HTMLFormExample() { |
| 91 | let formRef: HTMLFormElement | undefined; |
nothing calls this directly
no outgoing calls
no test coverage detected