diff --git a/platforms/react-native/modules/@shopify/checkout-kit-react-native/src/components/AcceleratedCheckoutButtons.tsx b/platforms/react-native/modules/@shopify/checkout-kit-react-native/src/components/AcceleratedCheckoutButtons.tsx index f3e97a9c9..325f03608 100644 --- a/platforms/react-native/modules/@shopify/checkout-kit-react-native/src/components/AcceleratedCheckoutButtons.tsx +++ b/platforms/react-native/modules/@shopify/checkout-kit-react-native/src/components/AcceleratedCheckoutButtons.tsx @@ -152,7 +152,6 @@ export type AcceleratedCheckoutButtonsProps = (CartProps | VariantProps) & * /> */ -const defaultStyles = {flex: 1}; const nativeComponentName = 'RCTAcceleratedCheckoutButtons'; const protocolEventTypesConstant = 'checkoutProtocolEventTypes'; const checkoutProtocolEventTypeValues = Object.values(CheckoutProtocol); @@ -287,7 +286,7 @@ export const AcceleratedCheckoutButtons: React.FC< testID="accelerated-checkout-buttons" applePayLabel={applePayLabel} applePayStyle={applePayStyle} - style={{...defaultStyles, height: dynamicHeight}} + style={dynamicHeight ? {height: dynamicHeight} : undefined} checkoutIdentifier={checkoutIdentifier} cornerRadius={cornerRadius} wallets={wallets} diff --git a/platforms/react-native/modules/@shopify/checkout-kit-react-native/tests/AcceleratedCheckoutButtons.test.tsx b/platforms/react-native/modules/@shopify/checkout-kit-react-native/tests/AcceleratedCheckoutButtons.test.tsx index a5738a50a..c9583e36e 100644 --- a/platforms/react-native/modules/@shopify/checkout-kit-react-native/tests/AcceleratedCheckoutButtons.test.tsx +++ b/platforms/react-native/modules/@shopify/checkout-kit-react-native/tests/AcceleratedCheckoutButtons.test.tsx @@ -420,10 +420,7 @@ describe('AcceleratedCheckoutButtons', () => { nativeComponent.props.onSizeChange({nativeEvent: {height: 42}}); }); nativeComponent = getByTestId('accelerated-checkout-buttons'); - expect(nativeComponent.props.style).toEqual({ - flex: 1, - height: 42, - }); + expect(nativeComponent.props.style).toEqual({height: 42}); }); it('warns and returns null when missing identifiers in production', () => {