import * as React from "react"; import { ViewStyle, StyleProp } from "react-native"; import Surface from "../Surface"; import type { $RemoveChildren } from "../types"; import type { AccessibilityState } from "react-native"; import { DefaultTheme } from "styled-components"; declare type Props = $RemoveChildren & { /** * Icon to display for the `FAB`. */ icon: React.ReactElement; /** * Optional label for extended `FAB`. */ label?: string; /** * Make the label text uppercased. */ uppercase?: boolean; /** * Accessibility label for the FAB. This is read by the screen reader when the user taps the FAB. * Uses `label` by default if specified. */ accessibilityLabel?: string; /** * Accessibility state for the FAB. This is read by the screen reader when the user taps the FAB. */ accessibilityState?: AccessibilityState; /** * Whether an icon change is animated. */ animated?: boolean; /** * Whether FAB is mini-sized, used to create visual continuity with other elements. This has no effect if `label` is specified. */ small?: boolean; /** * Custom color for the icon and label of the `FAB`. */ color?: string; /** * Whether `FAB` is disabled. A disabled button is greyed out and `onPress` is not called on touch. */ disabled?: boolean; /** * Whether `FAB` is currently visible. */ visible?: boolean; /** * Whether to show a loading indicator. */ loading?: boolean; /** * Function to execute on press. */ onPress?: () => void; /** * Function to execute on long press. */ onLongPress?: () => void; style?: StyleProp; /** * @optional */ theme?: DefaultTheme; testID?: string; }; /** * A floating action button represents the primary action in an application. * *
* * *
* * ## Usage * ```js * import * as React from 'react'; * import { StyleSheet } from 'react-native'; * import FAB from 'react-native-simple-elements/components/FAB'; * * const MyComponent = () => ( * console.log('Pressed')} * /> * ); * * const styles = StyleSheet.create({ * fab: { * position: 'absolute', * margin: 16, * right: 0, * bottom: 0, * }, * }) * * export default MyComponent; * ``` */ declare const FAB: ({ small, icon, label, accessibilityLabel, accessibilityState, animated, color: customColor, disabled, onPress, onLongPress, style, visible, uppercase, loading, testID, ...rest }: Props) => JSX.Element; export default FAB; declare const FABWithTheme: ({ small, icon, label, accessibilityLabel, accessibilityState, animated, color: customColor, disabled, onPress, onLongPress, style, visible, uppercase, loading, testID, ...rest }: Props) => JSX.Element; export { FABWithTheme as FAB };