import * as React from "react"; import type { BadgeProps } from "../Badge/types"; /** `layout="inline"` のとき `Badge`(`type="pill"`)へ渡すプロップ(BadgeProps のサブセット。いずれも省略可) */ export type NotificationBadgePillProps = Partial>; type NotificationBadgeBaseProps = NotificationBadgePillProps & { badgeContent?: number | string; max?: number; showZero?: boolean; invisible?: boolean; children: React.ReactNode; /** * overlay 時、角から外へずらす量(バッジ自身の幅・高さに対する %)。 * 小さいほど子(主にアイコン)に近づく。`0` で角に揃う。inline では無視される。 * @default 50 */ overlayOffsetPercent?: number; }; type OverlayLayoutProps = NotificationBadgeBaseProps & { layout?: "overlay"; position?: "top-right" | "top-left" | "bottom-right" | "bottom-left"; }; type OverlayNormalProps = OverlayLayoutProps & { variant?: "normal"; dotSize?: never; }; type OverlayDotProps = OverlayLayoutProps & { variant: "dot"; /** dot variant のサイズ */ dotSize?: "small" | "medium" | "large"; }; type InlineProps = NotificationBadgeBaseProps & { /** 子と並べて右端に数値 pill を表示 */ layout: "inline"; variant?: "normal"; position?: never; dotSize?: never; overlayOffsetPercent?: never; }; export type NotificationBadgeProps = OverlayNormalProps | OverlayDotProps | InlineProps; declare const NotificationBadge: React.ForwardRefExoticComponent>; export default NotificationBadge;