import * as React from "react"; import { StyleProp, ViewStyle } from "react-native"; import Surface from "../Surface"; import { DefaultTheme } from "styled-components"; import type { EllipsizeProp } from "../types"; declare type Props = React.ComponentProps & { /** * Mode of the chip. * - `flat` - flat chip without outline. * - `outlined` - chip with an outline. */ mode?: "flat" | "outlined"; /** * Text content of the `Chip`. */ children: React.ReactNode; /** * Icon to display for the `Chip`. Both icon and avatar cannot be specified. */ icon?: React.ReactElement; /** * Avatar to display for the `Chip`. Both icon and avatar cannot be specified. */ avatar?: React.ReactNode; /** * Whether chip is selected. */ selected?: boolean; /** * Whether to style the chip color as selected. */ selectedColor?: string; /** * Whether the chip is disabled. A disabled chip is greyed out and `onPress` is not called on touch. */ disabled?: boolean; /** * Accessibility label for the chip. This is read by the screen reader when the user taps the chip. */ accessibilityLabel?: string; /** * Accessibility label for the close icon. This is read by the screen reader when the user taps the close icon. */ closeIconAccessibilityLabel?: string; /** * Function to execute on press. */ onPress?: () => void; /** * Function to execute on long press. */ onLongPress?: () => void; /** * Function to execute on close button press. The close button appears only when this prop is specified. */ onClose?: () => void; /** * Style of chip's text */ textStyle?: any; style?: StyleProp; /** * @optional */ theme?: DefaultTheme; /** * Pass down testID from chip props to touchable for Detox tests. */ testID?: string; /** * Ellipsize Mode for the children text */ ellipsizeMode?: EllipsizeProp; }; /** * Chips can be used to display entities in small blocks. * *
*
* *
Flat chip
*
*
* *
Outlined chip
*
*
* * ## Usage * ```js * import * as React from 'react'; * import Chip from 'react-native-simple-elements/components/Chip'; * * const MyComponent = () => ( * console.log('Pressed')}>Example Chip * ); * * export default MyComponent; * ``` */ declare const Chip: ({ mode, children, icon, avatar, selected, disabled, accessibilityLabel, closeIconAccessibilityLabel, onPress, onLongPress, onClose, textStyle, style, testID, selectedColor, ellipsizeMode, ...rest }: Props) => JSX.Element; export default Chip;