import * as React from "react"; import { View, ViewStyle, StyleProp, GestureResponderEvent } from "react-native"; import TouchableRipple from "../TouchableRipple/TouchableRipple"; import type { $RemoveChildren } from "../types"; import { DefaultTheme } from "styled-components"; declare type Props = $RemoveChildren & { ImageComponent?: React.ComponentType; /** * Icon to display. */ source: Record; /** * Size of the icon. */ size?: number; /** * Whether the button is disabled. A disabled button is greyed out and `onPress` is not called on touch. */ disabled?: boolean; /** * Whether an icon change is animated. */ animated?: boolean; circle?: boolean; /** * Accessibility label for the button. This is read by the screen reader when the user taps the button. */ accessibilityLabel?: string; /** * Function to execute on press. */ onPress?: (e: GestureResponderEvent) => void; style?: StyleProp; ref?: React.RefObject; /** * @optional */ theme?: DefaultTheme; }; /** * An icon button is a button which displays only an icon without a label. * By default button has 150% size of the icon. * *
*
* *
Icon button
*
*
* *
Pressed icon button
*
*
* * ## Usage * ```js * import * as React from 'react'; * import ImageButton from "react-native-simple-elements/components/ImageButton"; * import * as Colors } from 'react-native-simple-elements/components/theme/colors'; * import CameraIcon from "@mdi/svg/svg/camera.svg"; * * const MyComponent = () => ( * console.log('Pressed')} * /> * ); * * export default MyComponent; * ``` * */ declare const ImageButton: ({ ImageComponent, source, size, accessibilityLabel, disabled, onPress, animated, circle, style, ...rest }: Props) => JSX.Element; export default ImageButton;