diff --git a/packages/react-native/Libraries/Components/Switch/Switch.js b/packages/react-native/Libraries/Components/Switch/Switch.js index 24db0a95029..d3b88afad78 100644 --- a/packages/react-native/Libraries/Components/Switch/Switch.js +++ b/packages/react-native/Libraries/Components/Switch/Switch.js @@ -264,7 +264,7 @@ const Switch: component( disabled, onTintColor: trackColorForTrue, style: StyleSheet.compose( - {height: 31, width: 51}, + {alignSelf: 'flex-start' as const}, StyleSheet.compose( style, ios_backgroundColor == null diff --git a/packages/react-native/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js b/packages/react-native/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js index 6ddb0cb20d9..1f9f75a3bb4 100644 --- a/packages/react-native/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +++ b/packages/react-native/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js @@ -58,4 +58,5 @@ export const Commands: NativeCommands = codegenNativeCommands({ export default (codegenNativeComponent('Switch', { paperComponentName: 'RCTSwitch', excludedPlatforms: ['android'], + interfaceOnly: true, }): ComponentType);