UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

62 lines (61 loc) 1.62 kB
import React from 'react'; import type { SpacingProps } from '../../shared/types'; import type { SkeletonShow } from '../skeleton/Skeleton'; export type BadgeProps = { /** * Aria label to describe the badge * Default: null */ label?: React.ReactNode; /** * Custom className on the component root * Default: null */ className?: string; /** * Skeleton should be applied when loading content * Default: null */ skeleton?: SkeletonShow; /** * The content to display the badge on top of. * Default: null */ children?: React.ReactNode; /** * The content of the component. * Default: null */ content?: string | number | React.ReactNode; /** * The vertical positioning of the component. * Default: null */ vertical?: 'bottom' | 'top'; /** * The horizontal positioning of the component. * Default: null */ horizontal?: 'left' | 'right'; /** * The variant of the component. * Default: information. */ variant?: 'information' | 'notification'; }; type BadgeAndSpacingProps = BadgeProps & SpacingProps & Omit<React.HTMLProps<HTMLElement>, 'content' | 'label'>; export declare const defaultProps: { label: any; className: any; skeleton: boolean; children: any; content: any; vertical: any; horizontal: any; variant: string; }; declare function Badge(localProps: BadgeAndSpacingProps): import("react/jsx-runtime").JSX.Element; declare namespace Badge { var _supportsSpacingProps: boolean; } export default Badge;