UNPKG

1.65 kBTypeScriptView Raw
1import * as React from 'react';
2import type { ThemeProp } from 'src/types';
3export declare type Props = {
4 /**
5 * Tooltip reference element. Needs to be able to hold a ref.
6 */
7 children: React.ReactElement;
8 /**
9 * The number of milliseconds a user must touch the element before showing the tooltip.
10 */
11 enterTouchDelay?: number;
12 /**
13 * The number of milliseconds after the user stops touching an element before hiding the tooltip.
14 */
15 leaveTouchDelay?: number;
16 /**
17 * Tooltip title
18 */
19 title: string;
20 /**
21 * Specifies the largest possible scale a title font can reach.
22 */
23 titleMaxFontSizeMultiplier?: number;
24 /**
25 * @optional
26 */
27 theme?: ThemeProp;
28};
29/**
30 * Tooltips display informative text when users hover over, focus on, or tap an element.
31 *
32 * Plain tooltips, when activated, display a text label identifying an element, such as a description of its function. Tooltips should include only short, descriptive text and avoid restating visible UI text.
33 *
34 * ## Usage
35 * ```js
36 * import * as React from 'react';
37 * import { IconButton, Tooltip } from 'react-native-paper';
38 *
39 * const MyComponent = () => (
40 * <Tooltip title="Selected Camera">
41 * <IconButton icon="camera" selected size={24} onPress={() => {}} />
42 * </Tooltip>
43 * );
44 *
45 * export default MyComponent;
46 * ```
47 */
48declare const Tooltip: {
49 ({ children, enterTouchDelay, leaveTouchDelay, title, theme: themeOverrides, titleMaxFontSizeMultiplier, ...rest }: Props): React.JSX.Element;
50 displayName: string;
51};
52export default Tooltip;
53//# sourceMappingURL=Tooltip.d.ts.map
\No newline at end of file