import React from 'react' import { PropsOf } from '@codeleap/types' import { StylesOf } from '../../types' import { Text } from '../Text' import { Touchable, TouchableProps } from '../Touchable' import { SegmentedControlComposition } from './styles' import { Icon } from '../Icon' import { AppIcon } from '@codeleap/styles' export type SegmentedControlOptionProps = Omit & { selected?: boolean label: string value: string variantStyles?: StylesOf textProps?: Omit, 'key'> icon?: AppIcon badge?: React.ReactNode debugName?: string } export const SegmentedControlOption = (props: SegmentedControlOptionProps) => { const { selected, onPress, debugName, style, variantStyles, label, value, icon, textProps, badge = null, ...touchableProps } = props return ( {!!icon ? : null} {badge} ) }