beta-parity-react
Version:
Beta Parity React Components
74 lines • 2.08 kB
TypeScript
import React from 'react';
import './index.css';
import './variables.css';
import { BaseProps } from '../Base';
declare const colorMap: Record<'neutral' | 'accent', string>;
declare const sizeMap: Record<'sm' | 'md' | 'lg', string>;
declare const kindMap: Record<'glass' | 'outlined', string>;
/**
* Props for the Tag component.
*
* Extends properties from the `span` element.
*/
export interface TagProps extends BaseProps {
/**
* The label of the Tag, displaying text.
*
* @memberof TagProps
*/
label?: string;
/**
* Optional icon to display in the Tag, image is supported
*
* @memberof TagProps
*/
icon?: React.ReactNode;
/**
* The size of the Tag, can be one of the keys from the sizeMap.
*
* @default 'md'
* @memberof TagProps
*/
size?: keyof typeof sizeMap;
/**
* The kind of the Tag, can be one of the keys from the kindMap.
*
* @default 'outlined'
* @memberof TagProps
*/
kind?: keyof typeof kindMap;
/**
* The color of the Tag, can be one of the keys from the colorMap.
*
* @default 'neutral'
* @memberof TagProps
*/
color?: keyof typeof colorMap;
/**
* The value of the Tag, can be a string or number, it is usable in checkbox, radio, dropdown, input type
*
* @memberof TagProps
*/
value?: string | number;
/**
* Whether the Tag is disabled.
*
* @memberof TagProps
*/
disabled?: boolean;
/**
* Callback when the remove button is clicked. it is available for button Tag
*
* @param {string | number} value - The value of the Tag to be removed.
* @memberof TagProps
*/
onRemove?: (value: string | number) => void;
}
/**
* **Parity Tag**.
*
* @see {@link https://beta-parity-react.vercel.app/tag Parity Tag}
*/
export declare const Tag: React.ForwardRefExoticComponent<TagProps & Omit<React.AllHTMLAttributes<HTMLElement>, keyof TagProps> & React.RefAttributes<HTMLElement>>;
export {};
//# sourceMappingURL=index.d.ts.map