Skip to content

Commit ed747e9

Browse files
anujsinglaanujsibennypowers
authored
docs: added change event for switch element (#2439)
* docs: added change event for switch element * docs: Update .changeset/pf-switch-2372.md --------- Co-authored-by: Anuj Singla <[email protected]> Co-authored-by: Benny Powers <[email protected]>
1 parent 3ea5936 commit ed747e9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/pf-switch-2372.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@patternfly/elements": patch
3+
---
4+
5+
`<pf-switch>`: documented the `change` event

elements/pf-switch/pf-switch.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import styles from './pf-switch.css';
88
* checkboxes can often be used interchangeably, but the switch provides a more
99
* explicit, visible representation on a setting.
1010
*
11+
* @fires {Event} change - Fires when the switch selection changes.
12+
*
1113
* @cssprop --pf-c-switch--FontSize {@default `1rem`}
1214
* @cssprop {<length>} --pf-c-switch--ColumnGap {@default `1rem`}
1315
* @cssprop --pf-c-switch__toggle-icon--FontSize {@default `calc(1rem * .625)`}

0 commit comments

Comments
 (0)