@ducor/react
Version:
admin template ui interface
52 lines (51 loc) • 1.4 kB
TypeScript
import React from "react";
import { Round } from "../helpers/rounded";
import { Color, Variant } from "@ducor/color";
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
label?: string;
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center" | "left-center" | "right-center";
round?: Round;
color?: Color;
children?: React.ReactNode;
className?: string;
variant?: Variant;
}
interface BadgeDotProps extends React.HTMLAttributes<HTMLDivElement> {
color?: keyof typeof colors;
children?: React.ReactNode;
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
}
declare const colors: {
default: {
bg: string;
border: string;
};
primary: {
bg: string;
border: string;
};
info: {
bg: string;
border: string;
};
success: {
bg: string;
border: string;
};
warning: {
bg: string;
border: string;
};
danger: {
bg: string;
border: string;
};
secondary: {
bg: string;
border: string;
};
};
declare const _default: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>> & {
Dot: React.ForwardRefExoticComponent<BadgeDotProps & React.RefAttributes<HTMLDivElement>>;
};
export default _default;