1 | import * as React from 'react';
|
2 | import { StyleProp, ViewStyle } from 'react-native';
|
3 | export type Props = {
|
4 | /**
|
5 | * Function to execute on selection change.
|
6 | */
|
7 | onValueChange: (value: string) => void;
|
8 | /**
|
9 | * Value of the currently selected toggle button.
|
10 | */
|
11 | value: string;
|
12 | /**
|
13 | * React elements containing toggle buttons.
|
14 | */
|
15 | children: React.ReactNode;
|
16 | style?: StyleProp<ViewStyle>;
|
17 | };
|
18 | /**
|
19 | * Toggle button row renders a group of toggle buttons in a row.
|
20 | *
|
21 | * ## Usage
|
22 | * ```js
|
23 | * import * as React from 'react';
|
24 | * import { ToggleButton } from 'react-native-paper';
|
25 | *
|
26 | * const MyComponent = () => {
|
27 | * const [value, setValue] = React.useState('left');
|
28 | *
|
29 | * return (
|
30 | * <ToggleButton.Row onValueChange={value => setValue(value)} value={value}>
|
31 | * <ToggleButton icon="format-align-left" value="left" />
|
32 | * <ToggleButton icon="format-align-right" value="right" />
|
33 | * </ToggleButton.Row>
|
34 | * );
|
35 | * };
|
36 | *
|
37 | * export default MyComponent;
|
38 | *
|
39 | *```
|
40 | */
|
41 | declare const ToggleButtonRow: {
|
42 | ({ value, onValueChange, children, style }: Props): React.JSX.Element;
|
43 | displayName: string;
|
44 | };
|
45 | export default ToggleButtonRow;
|
46 | export { ToggleButtonRow };
|
47 | //# sourceMappingURL=ToggleButtonRow.d.ts.map |
\ | No newline at end of file |