MCPcopy Create free account
hub / github.com/kobaltedev/kobalte / BasicExample

Function BasicExample

apps/docs/src/examples/toggle-button.tsx:7–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import style from "./toggle-button.module.css";
6
7export function BasicExample() {
8 return (
9 <ToggleButton class={style["toggle-button"]} aria-label="Mute">
10 {(state) => (
11 <Show
12 when={state.pressed()}
13 fallback={<VolumeOnIcon class="h-6 w-6" />}
14 >
15 <VolumeOffIcon class="h-6 w-6" />
16 </Show>
17 )}
18 </ToggleButton>
19 );
20}
21
22export function DefaultPressedExample() {
23 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected