Skip to content

Commit 1c0a31a

Browse files
committed
feat(SegmentedSwitch): label prop now only accepts string
BREAKING CHANGE: The label prop in SegmentedSwitch only accepts string. It no longer accepts any React element. Make sure to replace translation components by strings.
1 parent 62a919d commit 1c0a31a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/orbit-components/src/SegmentedSwitch/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ _Table below contains all types of the props available in the SegmentedSwitch co
3838
| options | [`Option[]`](#option) | | Array of options. |
3939
| onChange | `(ev: ChangeEvent<HTMLInputElement>) => void` | | Function for handling change event. |
4040
| onFocus | `(ev: FocusEvent<HTMLInputElement>) => void` | | Function for handling focus event. |
41-
| label | `React.Node` | | Label of the component. |
41+
| label | `string` | | Label of the component. |
4242
| showTooltip | `boolean` | `false` | Show tooltip. |
4343

4444
## Option

packages/orbit-components/src/SegmentedSwitch/types.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ export interface Props extends Common.Globals, Common.SpaceAfter {
2020
readonly error?: React.ReactNode;
2121
readonly maxWidth?: string;
2222
readonly help?: React.ReactNode;
23-
readonly label?: React.ReactNode;
23+
readonly label?: string;
2424
readonly options: Option[];
2525
}

0 commit comments

Comments
 (0)