mattermost-mobile/app/components/settings/option.tsx
Daniel Espino García a27c82da90
Refactor and cleanup of option item (#9067)
* Refactor and cleanup of option item

* Fix tests and minor cleanup

* Fix bug and address feedback
2025-08-19 14:01:56 +02:00

20 lines
559 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {Platform} from 'react-native';
import OptionItem, {type OptionItemProps} from '@components/option_item';
const SettingOption = ({...props}: OptionItemProps) => {
const useRadioButton = props.type === 'select' && Platform.OS === 'android';
return (
<OptionItem
{...props}
type={useRadioButton ? 'radio' : props.type}
/>
);
};
export default SettingOption;