UNPKG

react95-native

Version:

Refreshed Windows 95 style UI components for your React Native app

70 lines (69 loc) 6.06 kB
import React from 'react'; import { ViewStyle, StyleProp } from 'react-native'; import type { AccessibilityState } from 'react-native'; import type { $RemoveChildren, Theme } from '../../types'; import { Panel } from '../..'; declare type Props = $RemoveChildren<typeof Panel> & { icon?: boolean; /** * 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<ViewStyle>; /** * @optional */ testID?: string; theme: Theme; }; declare const _default: (React.ComponentClass<Pick<Props, "label" | "small" | "style" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityComponentType" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityTraits" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "onPress" | "key" | "disabled" | "onLongPress" | "variant" | "color" | "invert" | "radius" | "background" | "elevation" | "visible" | "icon" | "uppercase" | "loading" | "animated"> & { theme?: import("@callstack/react-theme-provider").$DeepPartial<Theme> | undefined; }, any> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & (({ icon, small, label, accessibilityLabel, accessibilityState, disabled, onPress, onLongPress, style, visible, uppercase, loading, testID, theme, ...rest }: Props) => JSX.Element)) | (React.FunctionComponent<Props> & (({ icon, small, label, accessibilityLabel, accessibilityState, disabled, onPress, onLongPress, style, visible, uppercase, loading, testID, theme, ...rest }: Props) => JSX.Element)), {}>) | (React.FunctionComponent<Pick<Props, "label" | "small" | "style" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityComponentType" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityTraits" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "onPress" | "key" | "disabled" | "onLongPress" | "variant" | "color" | "invert" | "radius" | "background" | "elevation" | "visible" | "icon" | "uppercase" | "loading" | "animated"> & { theme?: import("@callstack/react-theme-provider").$DeepPartial<Theme> | undefined; }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & (({ icon, small, label, accessibilityLabel, accessibilityState, disabled, onPress, onLongPress, style, visible, uppercase, loading, testID, theme, ...rest }: Props) => JSX.Element)) | (React.FunctionComponent<Props> & (({ icon, small, label, accessibilityLabel, accessibilityState, disabled, onPress, onLongPress, style, visible, uppercase, loading, testID, theme, ...rest }: Props) => JSX.Element)), {}>); export default _default;