react-native-cross-components
Version:
Beautiful React-Native components using RN Paper by Callstack
86 lines • 2.72 kB
TypeScript
import React from 'react';
import { ViewStyle, StyleProp, TextStyle } from 'react-native';
import { Color } from 'csstype';
/**
* Properties for the {@link CrossButton} component.
*
* Note the difference between {@link buttonStyle} and the regular {@link style} property.
*
* Remarks: react-native-paper is currently missing the option to customize `fontSize`.
*
* {@link iconName} is for a {@link https://fontawesome.com/v4.7.0/icons/ FontAwesome v4 icon}.
*
* {@link mode} is 'text'
*
* @typedef ICrossButtonProps
* @type ICrossButtonProps
*/
export interface ICrossButtonProps {
/**
* Foreground (icon) color. Default is {@link Colors.CrossBlack}
*/
color?: Color;
/**
* Font-Awesome 4 icon name using `react-native-vector-icons/FontAwesome`
*
* https://fontawesome.com/v4.7.0/icons/
*/
iconName?: string;
/**
* Background color. Default value is {@link Colors.NextButton} if {@link title} was supplied
*/
backgroundColor?: Color;
/**
* Style for outer container.
*
* See also {@link iconStyle}, {@link buttonStyle}
*/
style?: StyleProp<ViewStyle>;
/**
* Optional style for the icons. See also {@link iconName}
*
* See also {@link buttonStyle}, {@link style}
*/
iconStyle?: ViewStyle | TextStyle;
/**
* Title for the button. If not supplied a clickable icon will be displayed instead of react-native-paper button
*
* https://callstack.github.io/react-native-paper/button.html
*/
title?: string;
/**
* Size of the icon
*/
size?: number;
disabled?: boolean;
/**
* Button visual appearence. Default is 'text'
*
* https://callstack.github.io/react-native-paper/button.html
*/
mode?: 'text' | 'outlined' | 'contained';
/**
* Optional button styles to apply to {@link https://callstack.github.io/react-native-paper/button.html Button}.
*
* See also {@link iconStyle}, {@link style}
*/
buttonStyle?: StyleProp<ViewStyle>;
onPress?: () => void;
compact?: boolean;
}
/**
* A custom button that displays as an Paper Button with icon or just an icon if {@link ICrossButtonProps.title} is not supplied.
*
* Remarks:
*
* * All icons are {@link https://fontawesome.com/v4.7.0/icons/ FontAwesome v4}.
* * react-native-paper is currently missing the option to customize `fontSize`.
* * Default appearence is "text", see {@link ICrossButtonProps.mode}
*
* Properties are {@link ICrossButtonProps}
*/
export declare class CrossButton extends React.Component<ICrossButtonProps> {
render(): JSX.Element;
}
export default CrossButton;
//# sourceMappingURL=CrossButton.d.ts.map