@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
33 lines (32 loc) • 1.29 kB
TypeScript
import { ThemingProps } from "../theme/types.js";
import "../theme/index.js";
import { SystemProps } from "../system/system.js";
import "../system/index.js";
import { IconProp } from "../icon/icon.types.js";
import "../icon/index.js";
import { TagInnerProps } from "../tag/tag.types.js";
import "../tag/index.js";
import { JSX } from "react";
//#region src/badge/badge.types.d.ts
/** Visual hierarchy of the badge. */
type BadgeHierarchy = 'subtle' | 'solid';
/** Semantic colour of the badge. */
type BadgeColor = 'grey' | 'green' | 'yellow' | 'red' | 'blue';
type BadgeInnerProps = {
/** Visual hierarchy. */
variant?: BadgeHierarchy;
/** Semantic colour. */
color?: BadgeColor;
/** Icon displayed on the leading side of the content. */
icon?: IconProp | JSX.Element;
/** @deprecated Use `icon` instead. */
iconLeft?: IconProp | JSX.Element;
/** Label text as alternative to children. */
label?: React.ReactNode;
/** @deprecated Use `label` instead. */
text?: React.ReactNode;
};
type BadgeProps = SystemProps & Pick<ThemingProps<'Tag'>, 'size'> & Omit<TagInnerProps, 'variant' | 'intent' | 'startIcon' | 'endIcon' | 'text'> & BadgeInnerProps;
//#endregion
export { BadgeColor, BadgeHierarchy, BadgeInnerProps, BadgeProps };
//# sourceMappingURL=badge.types.d.ts.map