import React from "react"; import { CommonProps, EntityStatus, PickUnion, PropsWithHTMLElement } from "@contentful/f36-core"; import * as CSS from "csstype"; //#region src/types.d.ts type BadgeSize = 'default' | 'small'; type BadgeVariant = 'negative' | 'positive' | 'primary' | 'secondary' | 'warning' | 'primary-filled' | 'featured'; //#endregion //#region src/Badge/Badge.d.ts type BadgeInternalProps = CommonProps & { /** * Determines the variation of the component * @default primary */ variant?: BadgeVariant; children: React.ReactNode; /** * Sets the size of the component * @default default */ size?: BadgeSize; /** * Expects any of the icon components. Renders the icon aligned to the start */ startIcon?: React.ReactNode; /** * Expects any of the icon components. Renders the icon aligned to the end */ endIcon?: React.ReactNode; /** * By default the Badge uses CSS to capitalize only the first letter of the * badge text. This CSS is hit by a bug in Firefox that results in the badge * being rendered slightly too wide. To avoid the bug, set this property to * `none` to disable the text transformation. Please be sure the initial * letter of the badge text is already capitalized! */ textTransform?: Extract | undefined; /** * HTML element used to wrap the target of the tooltip * @default 'div' */ as?: React.ElementType; }; type BadgeProps = PropsWithHTMLElement; declare const Badge: React.ForwardRefExoticComponent, HTMLDivElement>, "ref">, never>, "children" | keyof CommonProps | "variant" | "size" | "startIcon" | "endIcon" | "textTransform" | "as"> & CommonProps & { /** * Determines the variation of the component * @default primary */ variant?: BadgeVariant; children: React.ReactNode; /** * Sets the size of the component * @default default */ size?: BadgeSize; /** * Expects any of the icon components. Renders the icon aligned to the start */ startIcon?: React.ReactNode; /** * Expects any of the icon components. Renders the icon aligned to the end */ endIcon?: React.ReactNode; /** * By default the Badge uses CSS to capitalize only the first letter of the * badge text. This CSS is hit by a bug in Firefox that results in the badge * being rendered slightly too wide. To avoid the bug, set this property to * `none` to disable the text transformation. Please be sure the initial * letter of the badge text is already capitalized! */ textTransform?: Extract | undefined; /** * HTML element used to wrap the target of the tooltip * @default 'div' */ as?: React.ElementType; } & React.RefAttributes>; //#endregion //#region src/EntityStatusBadge/EntityStatusBadge.d.ts type BadgeSizeWithIsScheduledProp = { /** * Sets the size of the component * @default default */ size?: Exclude; /** * Indicates that the entity that the badge is related to has a scheduled action */ isScheduled?: boolean; } | { /** * Sets the size of the component * @default default */ size: PickUnion; isScheduled?: never; }; type EntityStatusBadgeProps = Omit & BadgeSizeWithIsScheduledProp & { entityStatus: EntityStatus; }; declare const EntityStatusBadge: React.ForwardRefExoticComponent>; //#endregion export { Badge, type BadgeProps, type BadgeVariant, EntityStatusBadge, type EntityStatusBadgeProps }; //# sourceMappingURL=index.d.ts.map