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" +} 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';