react-native-ui-lib
Version:
<p align="center"> <img src="https://user-images.githubusercontent.com/1780255/105469025-56759000-5ca0-11eb-993d-3568c1fd54f4.png" height="250px" style="display:block"/> </p> <p align="center">UI Toolset & Components Library for React Native</p> <p a
122 lines (121 loc) • 3.26 kB
TypeScript
import React from 'react';
import { ViewStyle } from 'react-native';
import { ViewProps } from '../view';
import { TouchableOpacityProps } from '../touchableOpacity';
import CardImage from './CardImage';
import CardSection, { CardSectionProps } from './CardSection';
export interface CardSelectionOptions {
icon?: number;
iconColor?: string;
color?: string;
borderWidth?: number;
indicatorSize?: number;
hideIndicator?: boolean;
}
export { CardSectionProps };
export declare type CardProps = ViewProps & TouchableOpacityProps & {
/**
* card custom width
*/
width?: number | string;
/**
* card custom height
*/
height?: number | string;
/**
* should inner card flow direction be horizontal
*/
row?: boolean;
/**
* card border radius (will be passed to inner Card.Image component)
*/
borderRadius?: number;
/**
* action for when pressing the card
*/
onPress?: TouchableOpacityProps['onPress'];
/**
* whether the card should have shadow or not
*/
enableShadow?: boolean;
/**
* elevation value (Android only)
*/
elevation?: number;
/**
* enable blur effect (iOS only)
*/
enableBlur?: boolean;
/**
* blur option for blur effect according to @react-native-community/blur lib (make sure enableBlur is on)
*/
blurOptions?: object;
/**
* Additional styles for the top container
*/
containerStyle?: ViewStyle;
/**
* Adds visual indication that the card is selected
*/
selected?: boolean;
/**
* Custom options for styling the selection indication
*/
selectionOptions?: CardSelectionOptions;
};
declare const _default: React.ComponentClass<ViewProps & TouchableOpacityProps & {
/**
* card custom width
*/
width?: string | number | undefined;
/**
* card custom height
*/
height?: string | number | undefined;
/**
* should inner card flow direction be horizontal
*/
row?: boolean | undefined;
/**
* card border radius (will be passed to inner Card.Image component)
*/
borderRadius?: number | undefined;
/**
* action for when pressing the card
*/
onPress?: ((props?: any) => void) | undefined;
/**
* whether the card should have shadow or not
*/
enableShadow?: boolean | undefined;
/**
* elevation value (Android only)
*/
elevation?: number | undefined;
/**
* enable blur effect (iOS only)
*/
enableBlur?: boolean | undefined;
/**
* blur option for blur effect according to @react-native-community/blur lib (make sure enableBlur is on)
*/
blurOptions?: object | undefined;
/**
* Additional styles for the top container
*/
containerStyle?: ViewStyle | undefined;
/**
* Adds visual indication that the card is selected
*/
selected?: boolean | undefined;
/**
* Custom options for styling the selection indication
*/
selectionOptions?: CardSelectionOptions | undefined;
} & {
useCustomTheme?: boolean | undefined;
}, any> & {
Image: typeof CardImage;
Section: typeof CardSection;
};
export default _default;