1 | import * as React from 'react';
|
2 | import type { $Omit } from './../../types';
|
3 | import AppbarAction from './AppbarAction';
|
4 | import type { StyleProp, ViewStyle } from 'react-native';
|
5 | declare type Props = $Omit<React.ComponentPropsWithoutRef<typeof AppbarAction>, 'icon'> & {
|
6 | /**
|
7 | * Custom color for back icon.
|
8 | */
|
9 | color?: string;
|
10 | /**
|
11 | * Optional icon size.
|
12 | */
|
13 | size?: number;
|
14 | /**
|
15 | * Whether the button is disabled. A disabled button is greyed out and `onPress` is not called on touch.
|
16 | */
|
17 | disabled?: boolean;
|
18 | /**
|
19 | * Accessibility label for the button. This is read by the screen reader when the user taps the button.
|
20 | */
|
21 | accessibilityLabel?: string;
|
22 | /**
|
23 | * Function to execute on press.
|
24 | */
|
25 | onPress?: () => void;
|
26 | style?: StyleProp<ViewStyle>;
|
27 | };
|
28 | /**
|
29 | * A component used to display a back button in the appbar.
|
30 | *
|
31 | * <div class="screenshots">
|
32 | * <figure>
|
33 | * <img class="medium" src="screenshots/appbar-backaction-android.png" />
|
34 | * <figcaption>Android</figcaption>
|
35 | * </figure>
|
36 | * </div>
|
37 | *
|
38 | * <div class="screenshots">
|
39 | * <figure>
|
40 | * <img class="medium" src="screenshots/appbar-backaction-ios.png" />
|
41 | * <figcaption>iOS</figcaption>
|
42 | * </figure>
|
43 | * </div>
|
44 | *
|
45 | * ## Usage
|
46 | * ```js
|
47 | * import * as React from 'react';
|
48 | * import { Appbar } from 'react-native-paper';
|
49 | *
|
50 | *
|
51 | * const MyComponent = () => (
|
52 | * <Appbar.Header>
|
53 | * <Appbar.BackAction onPress={() => {}} />
|
54 | * </Appbar.Header>
|
55 | * );
|
56 | *
|
57 | * export default MyComponent;
|
58 | * ```
|
59 | */
|
60 | declare const AppbarBackAction: {
|
61 | ({ accessibilityLabel, ...rest }: Props): JSX.Element;
|
62 | displayName: string;
|
63 | };
|
64 | export default AppbarBackAction;
|
65 | export { AppbarBackAction };
|