// // Copyright 2026 DXOS.org // // @import-as-namespace import React, { type HTMLAttributes, forwardRef } from 'react'; import { mx } from '@dxos/ui-theme'; import { type ThemedClassName } from '@dxos/ui-types'; import { recipes } from '../../recipes.ts'; type BadgeCorner = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'; type BadgeRootProps = ThemedClassName>; /** Sizes to its child (an Avatar or an Icon) and anchors a `Mark` to one of its corners. */ const BadgeRoot = forwardRef(({ classNames, ...props }, forwardedRef) => ( )); BadgeRoot.displayName = 'Badge.Root'; type BadgeMarkProps = ThemedClassName> & { corner?: BadgeCorner; }; /** * A small glyph (an Avatar with `fill`, or an Icon) half the root's size over one of its corners, ringed in the surface * colour so it reads as cut out of what it overlaps. */ const BadgeMark = forwardRef( ({ classNames, corner = 'bottom-end', ...props }, forwardedRef) => ( ), ); BadgeMark.displayName = 'Badge.Mark'; export { BadgeMark as Mark, BadgeRoot as Root }; export type { BadgeCorner as Corner, BadgeMarkProps as MarkProps, BadgeRootProps as RootProps };