@heycar-uikit/core
Version:
The React UI library from HeyCar
48 lines (47 loc) • 1.21 kB
TypeScript
/// <reference types="react" />
import React from 'react';
import { MouseEventHandler } from "react";
interface ComponentProps {
/**
* Customize Chip type
*/
variant?: "filter" | "choice";
/**
* Add on Delete callback
*/
onDelete?: MouseEventHandler<HTMLElement>;
/**
* Add on click callback
*/
onClick?: MouseEventHandler<HTMLElement>;
/**
* The content of the Chip
*/
children: React.ReactNode;
/**
* Boolean to make chip disable.
*/
disabled?: boolean;
/**
* selected style for choice chip
*/
selected?: boolean;
/**
* The component used for the root node. Either a string to use a HTML element or a component
*/
Component?: React.ElementType;
/**
* Element placed after the children.
*/
leftIcon?: React.ReactNode;
/**
* Element before after the children.
*/
rightIcon?: React.ReactNode;
/**
* The id for testing
*/
dataTestId?: string;
}
declare const Chip: React.ForwardRefExoticComponent<Partial<ComponentProps & React.AnchorHTMLAttributes<HTMLElement>> & React.RefAttributes<HTMLElement>>;
export { Chip as default };