diff --git a/package.json b/package.json index cefa60d..0d0940f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@procivis/one-react-native-components", - "version": "0.1.37", + "version": "0.1.38", "author": "Procivis AG (https://procivis.ch)", "license": "Apache-2.0", "description": "Common Procivis ONE UI components for react-native", diff --git a/src/settings/button-setting.tsx b/src/settings/button-setting.tsx index 148a2e3..c3825e5 100644 --- a/src/settings/button-setting.tsx +++ b/src/settings/button-setting.tsx @@ -8,6 +8,7 @@ import SettingItem from './setting-item'; export type ButtonSettingProps = { accessory?: ComponentType | ReactElement; + disabled?: boolean; icon?: ComponentType | ReactElement; onPress: () => void; style?: StyleProp; @@ -15,7 +16,15 @@ export type ButtonSettingProps = { title: string; }; -const ButtonSetting: FunctionComponent = ({ accessory, title, onPress, icon, style, testID }) => { +const ButtonSetting: FunctionComponent = ({ + accessory, + disabled, + title, + onPress, + icon, + style, + testID, +}) => { const colorScheme = useAppColorScheme(); const accessoryView: React.ReactElement | undefined = useMemo(() => { @@ -35,7 +44,12 @@ const ButtonSetting: FunctionComponent = ({ accessory, title }, [accessory, colorScheme.text]); return ( - + {accessoryView}