From d764e76ccfc444dddd8c4a777babd3acdae25435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Lafont?= Date: Wed, 19 Feb 2025 15:26:35 +0100 Subject: [PATCH] fix(SwitchButton): incorrect onchange type (#4786) --- .changeset/chilly-months-itch.md | 5 +++++ packages/ui/src/components/SwitchButton/index.tsx | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/chilly-months-itch.md diff --git a/.changeset/chilly-months-itch.md b/.changeset/chilly-months-itch.md new file mode 100644 index 0000000000..cfb4020c14 --- /dev/null +++ b/.changeset/chilly-months-itch.md @@ -0,0 +1,5 @@ +--- +"@ultraviolet/ui": patch +--- + +fix(SwitchButton): incorrect onchange type diff --git a/packages/ui/src/components/SwitchButton/index.tsx b/packages/ui/src/components/SwitchButton/index.tsx index cd783a865e..414a998ce1 100644 --- a/packages/ui/src/components/SwitchButton/index.tsx +++ b/packages/ui/src/components/SwitchButton/index.tsx @@ -63,10 +63,10 @@ const StyledBorderedBox = styled.div<{ 'data-size': 'small' | 'medium' }>` } ` type SwitchButtonProps = { - name: string - onBlur?: FocusEventHandler - onChange: ChangeEventHandler - onFocus?: FocusEventHandler + name?: string + onBlur?: FocusEventHandler + onChange: ChangeEventHandler + onFocus?: FocusEventHandler tooltip?: string value?: string | number leftButton: {