Skip to content

Commit

Permalink
📝 update switch.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lerte committed Nov 28, 2024
1 parent cd570f2 commit a2f9560
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apps/docs/content/components/switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ description: Switches toggle the state of an item on or off

## Events

| Events | Description |
| ---------- | --------------------------- |
| `onChange` | fired when selected changed |
| Name | Type | Description |
| --------------- | ------------------------------- | ----------------------------------------------------------------- |
| `onChange` | (isSelected: boolean) => void | Handler that is called when the Switch's selection state changes. |
| `onFocus` | (e: FocusEvent<Target>) => void | Handler that is called when the element receives focus. |
| `onBlur` | (e: FocusEvent<Target>) => void | Handler that is called when the element loses focus. |
| `onFocusChange` | (isFocused: boolean) => void | Handler that is called when the element's focus status changes. |
| `onKeyDown` | (e: KeyboardEvent) => void | Handler that is called when a key is pressed. |
| `onKeyUp` | (e: KeyboardEvent) => void | Handler that is called when a key is released. |
| `onHoverStart` | (e: HoverEvent) => void | Handler that is called when a hover interaction starts. |
| `onHoverEnd` | (e: HoverEvent) => void | Handler that is called when a hover interaction ends. |
| `onHoverChange` | (isHovering: boolean) => void | Handler that is called when the hover state changes. |

0 comments on commit a2f9560

Please sign in to comment.