UNPKG

@codeworker.br/govbr-tw-react

Version:

Biblioteca de componentes React usando Tailwind CSS que implementa o Padrão Digital de Governo.

55 lines (54 loc) 1.78 kB
import { ComponentProps, FC } from "react"; import { Avatar } from "../Avatar"; declare const CATEGORY_PRESETS: { readonly EX: { readonly label: "Extinct"; readonly className: "bg-govbr-pure-100 text-red-500"; }; readonly EW: { readonly label: "Extinct in the Wild"; readonly className: "bg-govbr-pure-100 text-govbr-pure-0"; }; readonly CR: { readonly label: "Critically Endangered"; readonly className: "bg-red-600 text-red-200"; }; readonly EN: { readonly label: "Endangered"; readonly className: "bg-orange-500 text-orange-200"; }; readonly VU: { readonly label: "Vulnerable"; readonly className: "bg-yellow-400 text-yellow-200"; }; readonly NT: { readonly label: "Near Threatened"; readonly className: "bg-emerald-700 text-emerald-200"; }; readonly LC: { readonly label: "Least Concern"; readonly className: "bg-emerald-700 text-govbr-pure-0"; }; readonly DD: { readonly label: "Data Deficient"; readonly className: "bg-neutral-400 text-neutral-600"; }; readonly NE: { readonly label: "Not Evaluated"; readonly className: "bg-neutral-200 text-neutral-400"; }; }; type IucnCategoryCode = keyof typeof CATEGORY_PRESETS; type AvatarProps = ComponentProps<typeof Avatar>; interface IucnCategoryProps extends AvatarProps { category: string; label?: string; labels?: Partial<Record<IucnCategoryCode, string>>; showLabel?: boolean; labelClassName?: string; wrapperClassName?: string; } declare const IucnCategory: FC<IucnCategoryProps>; export type { IucnCategoryCode, IucnCategoryProps }; export { IucnCategory }; export default IucnCategory;