From 07b87a100da825051c5d5d26cf780c1e529c8f2d Mon Sep 17 00:00:00 2001 From: Siobhan Bamber Date: Fri, 12 May 2023 13:30:34 +0100 Subject: [PATCH] feat: Add disabled prop to SwitchCell component (#50560) --- .../src/mobile/bottom-sheet/switch-cell.native.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/components/src/mobile/bottom-sheet/switch-cell.native.js b/packages/components/src/mobile/bottom-sheet/switch-cell.native.js index 9dcaf794df750..53b804bedfb7b 100644 --- a/packages/components/src/mobile/bottom-sheet/switch-cell.native.js +++ b/packages/components/src/mobile/bottom-sheet/switch-cell.native.js @@ -13,7 +13,7 @@ import { __, _x, sprintf } from '@wordpress/i18n'; import Cell from './cell'; export default function BottomSheetSwitchCell( props ) { - const { value, onValueChange, ...cellProps } = props; + const { value, onValueChange, disabled, ...cellProps } = props; const onPress = () => { onValueChange( ! value ); @@ -60,8 +60,13 @@ export default function BottomSheetSwitchCell( props ) { onPress={ onPress } editable={ false } value={ '' } + disabled={ disabled } > - + ); }