1 | import * as React from 'react';
|
2 | import { StyleProp, View, ViewStyle } from 'react-native';
|
3 | import type { ThemeProp } from '../../types';
|
4 | export type Props = React.ComponentPropsWithRef<typeof View> & {
|
5 | /**
|
6 | * Title to show as the header for the section.
|
7 | */
|
8 | title?: string;
|
9 | /**
|
10 | * Content of the `Drawer.Section`.
|
11 | */
|
12 | children: React.ReactNode;
|
13 | /**
|
14 | * Whether to show `Divider` at the end of the section. True by default.
|
15 | */
|
16 | showDivider?: boolean;
|
17 | /**
|
18 | * Specifies the largest possible scale a title font can reach.
|
19 | */
|
20 | titleMaxFontSizeMultiplier?: number;
|
21 | style?: StyleProp<ViewStyle>;
|
22 | /**
|
23 | * @optional
|
24 | */
|
25 | theme?: ThemeProp;
|
26 | };
|
27 | /**
|
28 | * A component to group content inside a navigation drawer.
|
29 | *
|
30 | * ## Usage
|
31 | * ```js
|
32 | * import * as React from 'react';
|
33 | * import { Drawer } from 'react-native-paper';
|
34 | *
|
35 | * const MyComponent = () => {
|
36 | * const [active, setActive] = React.useState('');
|
37 | *
|
38 | * return (
|
39 | * <Drawer.Section title="Some title">
|
40 | * <Drawer.Item
|
41 | * label="First Item"
|
42 | * active={active === 'first'}
|
43 | * onPress={() => setActive('first')}
|
44 | * />
|
45 | * <Drawer.Item
|
46 | * label="Second Item"
|
47 | * active={active === 'second'}
|
48 | * onPress={() => setActive('second')}
|
49 | * />
|
50 | * </Drawer.Section>
|
51 | * );
|
52 | * };
|
53 | *
|
54 | * export default MyComponent;
|
55 | * ```
|
56 | */
|
57 | declare const DrawerSection: {
|
58 | ({ children, title, theme: themeOverrides, style, showDivider, titleMaxFontSizeMultiplier, ...rest }: Props): React.JSX.Element;
|
59 | displayName: string;
|
60 | };
|
61 | export default DrawerSection;
|
62 | //# sourceMappingURL=DrawerSection.d.ts.map |
\ | No newline at end of file |