Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | import { StyleProp, ViewStyle, AccessibilityRole, AccessibilityState } from 'react-native';
import { ReactElement } from 'react';
import { ButtonHTMLAttributes, ReactNode, Ref } from 'react';
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'ghostDark' | 'cyan' | 'withShadow';
export type ButtonSize = 'small' | 'medium' | 'large';
export interface ButtonNativeProps {
id?: string;
label?: string | ReactElement;
icon?: ReactElement;
onPress?: () => void;
disabled?: boolean;
variant?: ButtonVariant;
size?: ButtonSize;
loading?: boolean;
rounded?: boolean;
style?: StyleProp<ViewStyle>;
accessibilityLabel?: string;
className?: string;
textStyle?: string;
accessibilityRole?: AccessibilityRole;
accessibilityState?: AccessibilityState;
accessibilityHint?: string;
}
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
label: string | ReactNode;
onClick?: () => void;
icon?: ReactNode;
disabled?: boolean;
variant?: ButtonVariant;
size?: ButtonSize;
loading?: boolean;
rounded?: boolean;
forwardedRef?: Ref<HTMLButtonElement>;
asChild?: boolean;
textStyle?: string;
className?: string;
as?: React.ElementType;
ariaLabel?: string;
} |