From 022a6fc18f13843d1d57c50822bcbf0965acce83 Mon Sep 17 00:00:00 2001 From: Lawrence Win Date: Mon, 3 Apr 2023 11:58:10 -0700 Subject: [PATCH 1/2] Update Switch docs to reflect latest changes --- packages/components/Switch/SPEC.md | 5 ++--- packages/components/Switch/src/Switch.types.ts | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/components/Switch/SPEC.md b/packages/components/Switch/SPEC.md index c3420a861c..28d6994472 100644 --- a/packages/components/Switch/SPEC.md +++ b/packages/components/Switch/SPEC.md @@ -49,6 +49,7 @@ The `Switch` component has six slots. The slots behave as follows: - `thumb` - By default a circle. Its location informs the user of the Switch's toggle state. - `toggleContainer` - Container for the thumb and track. - `onOffText` - If specified, renders the the toggle state of the Switch as text. +- `onOffTextContainer` - If `onText` or `offText` are passed, this is the container that holds such text. The slots can be modified using the `compose` function on the `Switch`. For more information on using the `compose` API, please see [this page](../../framework/composition/README.md). @@ -96,9 +97,7 @@ export interface SwitchProps extends Omit { onText?: string; /** - * Sets the position of the Switch's label. The position value 'after' is mutually - * exclusive with the onText and offText props. This is due to variable width - * of the text props causing the Switch's position to change when it shouldn't. + * The position of the label relative to the Switch. * Note : 'before' , 'above' are not supported on Android */ labelPosition?: 'before' | 'above' | 'after'; diff --git a/packages/components/Switch/src/Switch.types.ts b/packages/components/Switch/src/Switch.types.ts index 049251505c..5044ce2079 100644 --- a/packages/components/Switch/src/Switch.types.ts +++ b/packages/components/Switch/src/Switch.types.ts @@ -176,10 +176,8 @@ export interface SwitchProps extends Omit { onText?: string; /** - * The position of the label relative to the Switch. The position value 'after' is mutually - * exclusive with the onText and offText props. This is due to variable width - * of the text props causing the Switch's position to change when it shouldn't. - * Note :'before', 'above' are not supported on Android + * The position of the label relative to the Switch. + * Note : 'before' , 'above' are not supported on Android */ labelPosition?: 'before' | 'above' | 'after'; From c80390e17ed34442f4487a8872ae31ea33cdf03b Mon Sep 17 00:00:00 2001 From: Lawrence Win Date: Mon, 3 Apr 2023 11:58:27 -0700 Subject: [PATCH 2/2] Change files --- ...native-switch-75318127-a7fb-43e9-8414-10c181aa3b69.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-native-switch-75318127-a7fb-43e9-8414-10c181aa3b69.json diff --git a/change/@fluentui-react-native-switch-75318127-a7fb-43e9-8414-10c181aa3b69.json b/change/@fluentui-react-native-switch-75318127-a7fb-43e9-8414-10c181aa3b69.json new file mode 100644 index 0000000000..0c62b4f72e --- /dev/null +++ b/change/@fluentui-react-native-switch-75318127-a7fb-43e9-8414-10c181aa3b69.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update Switch docs to reflect latest changes", + "packageName": "@fluentui-react-native/switch", + "email": "winlarry@microsoft.com", + "dependentChangeType": "patch" +}