UNPKG

react95-native

Version:

Refreshed Windows 95 style UI components for your React Native app

26 lines (25 loc) 4.8 kB
import React from 'react'; import { View, StyleProp, ViewStyle } from 'react-native'; import type { Sizes, Theme } from '../../types'; export declare const testId = "button"; export declare type ButtonVariants = 'menu' | 'flat' | 'default' | 'raised'; declare type ButtonProps = React.ComponentPropsWithRef<typeof View> & { accessibilityLabel?: string; active?: boolean; children: React.ReactNode; disabled?: boolean; onPress?: () => void; onLongPress?: () => void; primary?: boolean; size?: Sizes; square?: boolean; style?: StyleProp<ViewStyle>; variant?: ButtonVariants; theme: Theme; }; declare const _default: (React.ComponentClass<Pick<ButtonProps, "ref" | "style" | "children" | "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" | "active" | "primary" | "size" | "square" | "variant"> & { theme?: import("@callstack/react-theme-provider").$DeepPartial<Theme> | undefined; }, any> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<ButtonProps, any> & (({ accessible, accessibilityLabel, active, children, disabled, onPress, onLongPress, primary, size, square, style, variant, theme, ...rest }: ButtonProps) => JSX.Element)) | (React.FunctionComponent<ButtonProps> & (({ accessible, accessibilityLabel, active, children, disabled, onPress, onLongPress, primary, size, square, style, variant, theme, ...rest }: ButtonProps) => JSX.Element)), {}>) | (React.FunctionComponent<Pick<ButtonProps, "ref" | "style" | "children" | "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" | "active" | "primary" | "size" | "square" | "variant"> & { theme?: import("@callstack/react-theme-provider").$DeepPartial<Theme> | undefined; }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<ButtonProps, any> & (({ accessible, accessibilityLabel, active, children, disabled, onPress, onLongPress, primary, size, square, style, variant, theme, ...rest }: ButtonProps) => JSX.Element)) | (React.FunctionComponent<ButtonProps> & (({ accessible, accessibilityLabel, active, children, disabled, onPress, onLongPress, primary, size, square, style, variant, theme, ...rest }: ButtonProps) => JSX.Element)), {}>); export default _default;