Skip to content

Latest commit

聽

History

History
248 lines (216 loc) 路 7.34 KB

File metadata and controls

248 lines (216 loc) 路 7.34 KB

API Report File for "@rcaferati/react-native-awesome-button"

Do not edit this file. It is a report generated by API Extractor.

import type { ColorValue } from 'react-native';
import type { GestureResponderEvent } from 'react-native';
import type { JSX as JSX_2 } from 'react';
import type { PressableProps } from 'react-native';
import type { ReactNode } from 'react';
import type { StyleProp } from 'react-native';
import type { ViewStyle } from 'react-native';

// @public
const AwesomeButton: (props: AwesomeButtonProps) => JSX_2.Element;
export default AwesomeButton;

// @public
export type AwesomeButtonAnimationCurve = (value: number) => number;

// @public
export type AwesomeButtonOnPress = (next?: ProgressCompletionHandler) => void;

// @public
export type AwesomeButtonPressableProps = Omit<PressableProps, 'children' | 'onLongPress' | 'onPress' | 'onPressIn' | 'onPressOut'>;

// @public
export interface AwesomeButtonProps {
    accessibilityHint?: string;
    accessibilityLabel?: string;
    accessibilityLongPressLabel?: string;
    // @deprecated
    activeOpacity?: number;
    // @deprecated
    activityColor?: string;
    after?: ReactNode;
    animatedPlaceholder?: boolean;
    animateSize?: boolean;
    // @deprecated
    backgroundActive?: string;
    // @deprecated
    backgroundColor?: string;
    // @deprecated
    backgroundDarker?: string;
    // @deprecated
    backgroundPlaceholder?: string;
    // @deprecated
    backgroundProgress?: string;
    // @deprecated
    backgroundShadow?: string;
    before?: ReactNode;
    // @deprecated
    borderBottomLeftRadius?: number;
    // @deprecated
    borderBottomRightRadius?: number;
    // @deprecated
    borderColor?: string;
    // @deprecated
    borderLeftBottomRadius?: number;
    // @deprecated
    borderRadius?: number;
    // @deprecated
    borderTopLeftRadius?: number;
    // @deprecated
    borderTopRightRadius?: number;
    // @deprecated
    borderWidth?: number;
    buttonStyle?: AwesomeButtonStyle;
    children?: ReactNode;
    containerStyle?: StyleProp<ViewStyle>;
    dangerouslySetPressableProps?: AwesomeButtonPressableProps;
    debouncedPressTime?: number;
    disabled?: boolean;
    extra?: ReactNode;
    faceHeight?: number;
    // @deprecated
    height?: number;
    hitSlop?: PressableProps['hitSlop'];
    // @deprecated
    onLongPress?: PressableProps['onLongPress'];
    onLongPressAction?: () => void;
    onPress?: AwesomeButtonOnPress;
    onPressedIn?: () => void;
    onPressedOut?: () => void;
    onPressIn?: (event: GestureResponderEvent) => void;
    onPressOut?: (event: GestureResponderEvent) => void;
    onProgressEnd?: () => void;
    onProgressStart?: () => void;
    // @deprecated
    paddingBottom?: number;
    // @deprecated
    paddingHorizontal?: number;
    // @deprecated
    paddingTop?: number;
    progress?: boolean;
    progressLoadingTime?: number;
    // @deprecated
    raiseLevel?: number;
    showProgressBar?: boolean;
    // @deprecated
    springRelease?: boolean;
    stretch?: boolean;
    // @deprecated
    style?: StyleProp<ViewStyle>;
    // @deprecated
    textColor?: string;
    // @deprecated
    textFontFamily?: string;
    // @deprecated
    textLineHeight?: number;
    // @deprecated
    textSize?: number;
    textTransition?: boolean;
    width?: ButtonWidth;
}

// @public
export type AwesomeButtonRegisteredThemeDefinition = Omit<RegisteredThemeDefinition, 'buttons'> & {
    buttons: AwesomeButtonThemeDefinitions;
};

// @public
export interface AwesomeButtonStyle {
    activeOpacity?: number;
    activityColor?: ColorValue;
    animationCurve?: AwesomeButtonAnimationCurve;
    animationDuration?: number;
    backgroundActive?: ColorValue;
    backgroundColor?: ColorValue;
    backgroundPlaceholder?: ColorValue;
    backgroundProgress?: ColorValue;
    borderBottomLeftRadius?: number;
    borderBottomRightRadius?: number;
    borderColor?: ColorValue;
    borderRadius?: number;
    borderTopLeftRadius?: number;
    borderTopRightRadius?: number;
    borderWidth?: number;
    contentGap?: number;
    depthColor?: ColorValue;
    disabledBackgroundColor?: ColorValue;
    disabledBorderColor?: ColorValue;
    disabledDepthColor?: ColorValue;
    disabledForegroundColor?: ColorValue;
    disabledShadowColor?: ColorValue;
    foregroundColor?: ColorValue;
    paddingBottom?: number;
    paddingHorizontal?: number;
    paddingTop?: number;
    pressedOverlayColor?: ColorValue;
    pressInAnimationDuration?: number;
    raiseAmount?: number;
    shadowColor?: ColorValue;
    textFontFamily?: string;
    textLineHeight?: number;
    textSize?: number;
}

// @public
export type AwesomeButtonThemeDefinition = Omit<ThemeDefinition, 'buttons'> & {
    buttons: AwesomeButtonThemeDefinitions;
};

// @public
export type AwesomeButtonThemeDefinitions = ThemeButtonDefinitions & Partial<Record<'x', ThemeButtonStyle>>;

// @public
export type AwesomeButtonVariant = ButtonVariant | 'x';

// @public
export type ButtonSize = 'icon' | 'small' | 'medium' | 'large';

// @public @deprecated
export type ButtonTypes = AwesomeButtonProps;

// @public
export type ButtonVariant = CoreButtonVariant | SocialButtonVariant;

// @public
export type ButtonWidth = number | 'auto' | null;

// @public
export type CoreButtonVariant = 'primary' | 'secondary' | 'anchor' | 'danger' | 'disabled' | 'flat';

// @public
export const getTheme: (index?: number | null, name?: ThemeName | null) => AwesomeButtonRegisteredThemeDefinition;

// @public
export type ProgressCompletionHandler = (callback?: () => void) => void;

// @public
export type RegisteredThemeDefinition = ThemeDefinition & {
    name: ThemeName;
    next: boolean;
    prev: boolean;
};

// @public
export type SocialButtonVariant = 'twitter' | 'messenger' | 'facebook' | 'github' | 'linkedin' | 'whatsapp' | 'reddit' | 'pinterest' | 'youtube';

// @public
export type ThemeButtonDefinitions = Record<ButtonVariant, ThemeButtonStyle>;

// @public
export type ThemeButtonStyle = Pick<AwesomeButtonProps, 'activityColor' | 'backgroundActive' | 'backgroundColor' | 'backgroundDarker' | 'backgroundPlaceholder' | 'backgroundProgress' | 'backgroundShadow' | 'borderColor' | 'borderRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderWidth' | 'height' | 'paddingBottom' | 'paddingHorizontal' | 'paddingTop' | 'raiseLevel' | 'textColor' | 'textFontFamily' | 'textLineHeight' | 'textSize' | 'width'>;

// @public
export const ThemedButton: (props: ThemedButtonProps) => JSX_2.Element;

// @public
export interface ThemedButtonProps extends AwesomeButtonProps {
    autoWidth?: boolean;
    config?: AwesomeButtonThemeDefinition;
    flat?: boolean;
    index?: number | null;
    name?: ThemeName | null;
    size?: ButtonSize;
    transparent?: boolean;
    type?: AwesomeButtonVariant;
}

// @public
export type ThemeDefinition = {
    title: string;
    background: string;
    color: string;
    buttons: ThemeButtonDefinitions;
    size: ThemeSizeDefinitions;
};

// @public
export type ThemeName = 'basic' | 'bojack' | 'cartman' | 'mysterion' | 'c137' | 'rick' | 'summer' | 'bruce';

// @public
export type ThemeSizeDefinitions = Record<ButtonSize, ThemeSizeStyle>;

// @public
export type ThemeSizeStyle = {
    width: number;
    height: number;
    textSize?: number;
    paddingHorizontal?: number;
};

// (No @packageDocumentation comment for this package)