@atlaskit/lozenge
Version:
A lozenge is a visual indicator used to highlight an item's status for quick recognition.
43 lines (42 loc) • 1.68 kB
TypeScript
/**
* @jsxRuntime classic
* @jsx jsx
*/
import { type CSSProperties, type ReactNode } from 'react';
import { type NewLozengeProps } from './new/types';
export type ThemeAppearance = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
export interface LozengeProps {
/**
* The appearance type.
*/
appearance?: ThemeAppearance;
/**
* Elements to be rendered inside the lozenge. This should ideally be just a word or two.
*/
children?: ReactNode;
/**
* Determines whether to apply the bold style or not.
* @deprecated This prop is deprecated and will be removed in an upcoming major release. Use Tag component for non-bold styles.
*/
isBold?: boolean;
/**
* max-width of lozenge container. Default to 200px.
*/
maxWidth?: number | string;
/**
* Style customization to apply to the badge. Only `backgroundColor` and `color` are supported.
* @deprecated This prop is deprecated and will be removed in an upcoming major release. Accent colors will be supported through the `appearance` prop in a future release.
*/
style?: Pick<CSSProperties, 'backgroundColor' | 'color'>;
/**
* A `testId` prop is provided for specified elements, which is a unique
* string that appears as a data attribute `data-testid` in the rendered code,
* serving as a hook for automated tests
*/
testId?: string;
}
/**
* Wrapper component that switches between old and new Lozenge based on feature flag
*/
declare const LozengeWrapper: import('react').MemoExoticComponent<(props: LozengeProps | NewLozengeProps) => JSX.Element>;
export default LozengeWrapper;