import * as React from 'react'; type Props = { /** * Function to execute on selection change. */ onValueChange: (value: string) => void | null; /** * Value of the currently selected toggle button. */ value: string | null; /** * React elements containing toggle buttons. */ children: React.ReactNode; }; type ToggleButtonContextType = { value: string | null; onValueChange: (item: string) => void | null; }; export const ToggleButtonGroupContext = React.createContext(null as any); /** * Toggle group allows to control a group of toggle buttons.
* It doesn't change the appearance of the toggle buttons. If you want to group them in a row, check out `ToggleButton.Row`. * *
*
* *
*
* * ## Usage * ```js * import * as React from 'react'; * import { ToggleButton } from 'react-native-paper'; * * const MyComponent = () => { * const [value, setValue] = React.useState('left'); * * return ( * setValue(value)} * value={value}> * * * * ); * }; * * export default MyComponent; *``` */ const ToggleButtonGroup = ({ value, onValueChange, children }: Props) => ( {children} ); ToggleButtonGroup.displayName = 'ToggleButton.Group'; export default ToggleButtonGroup; // @component-docs ignore-next-line export { ToggleButtonGroup };