import React, { ChangeEvent, ReactElement } from 'react'; import css from '../../utils/css'; import { StyledSelectButton, StyledInput, StyledInputText, } from './StyledSelectButton'; import { CommonProps } from '../common'; import { useDeprecation } from '../../utils/hooks'; export interface SelectButtonProps extends Omit { /** * Specify whether the option is disabled. */ disabled?: boolean; /** * Id of element. */ id?: string; /** * Name of element, is used to refer to the form data for submission. */ name?: string; /** * Change event handler. Use `event.target.checked` to see whether the button will be changed to checked. */ onChange?: (e: ChangeEvent) => void; /** * Whether the button is being chosen. */ selected?: boolean; /** * The size of the select button. */ size?: 'small' | 'medium' | 'large'; /** * Label of the select button. */ text: string | ReactElement; /** * Value of the select button option. */ value: string | number; } const SelectButton = ({ text, value, selected, disabled, onChange, size = 'medium', name, id, className, style, sx = {}, 'data-test-id': dataTestId, }: SelectButtonProps): ReactElement => { useDeprecation( 'SelectButton is deprecated. Please use Radio.Button with the same functionalities.' ); return ( {text} ); }; export default SelectButton;