lucid-ui
Version:
A UI component library from AppNexus.
52 lines (51 loc) • 1.77 kB
TypeScript
import React from 'react';
import { StandardProps } from '../../util/component-types';
export interface ITagProps extends StandardProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
/** Set this prop if you're using three levels of tags so it can be styled
appropriately. This is required because we aren't able to know if your
Tags have grand children efficiently. */
isTop: boolean;
/** Use the light background when your tags are on a white page background.
Use a dark background when your tags need to be placed on a darker
background (e.g. in a page header). */
hasLightBackground: boolean;
/** Shows or hides the little "x" for a given tag. */
isRemovable: boolean;
/** Style variations of the `Tag`. */
kind?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default';
/** Called when the user clicks to remove a tag. */
onRemove: ({ props, event, }: {
props: ITagProps;
event: React.MouseEvent;
}) => void;
}
export declare const Tag: {
(props: ITagProps): React.ReactElement;
defaultProps: {
isTop: boolean;
hasLightBackground: boolean;
isRemovable: boolean;
onRemove: (...args: any[]) => void;
kind: "default";
};
displayName: string;
peek: {
description: string;
notes: {
overview: string;
intendedUse: string;
technicalRecommendations: string;
};
categories: string[];
};
propTypes: {
isTop: any;
hasLightBackground: any;
isRemovable: any;
kind: any;
onRemove: any;
children: any;
className: any;
};
};
export default Tag;