()
| 78 | } |
| 79 | |
| 80 | export function ErrorMessageExample() { |
| 81 | const [checked, setChecked] = createSignal(false); |
| 82 | |
| 83 | return ( |
| 84 | <Checkbox |
| 85 | class={clsx(style.checkbox, "!items-start")} |
| 86 | checked={checked()} |
| 87 | onChange={setChecked} |
| 88 | validationState={!checked() ? "invalid" : "valid"} |
| 89 | > |
| 90 | <Checkbox.Input class={style.checkbox__input} /> |
| 91 | <Checkbox.Control class={style.checkbox__control}> |
| 92 | <Checkbox.Indicator> |
| 93 | <CheckIcon /> |
| 94 | </Checkbox.Indicator> |
| 95 | </Checkbox.Control> |
| 96 | <div class="flex flex-col items-start -mt-0.5"> |
| 97 | <Checkbox.Label class={style.checkbox__label}>Subscribe</Checkbox.Label> |
| 98 | <Checkbox.ErrorMessage class={style["checkbox__error-message"]}> |
| 99 | You must agree to our Terms and Conditions. |
| 100 | </Checkbox.ErrorMessage> |
| 101 | </div> |
| 102 | </Checkbox> |
| 103 | ); |
| 104 | } |
| 105 | |
| 106 | export function HTMLFormExample() { |
| 107 | let formRef: HTMLFormElement | undefined; |
nothing calls this directly
no outgoing calls
no test coverage detected