27 lines
494 B
TypeScript
27 lines
494 B
TypeScript
import type { PillProps } from "$/types/PillTypes";
|
|
import clsx from "clsx";
|
|
|
|
|
|
export default function Pill({
|
|
className,
|
|
rounding = "full",
|
|
...props
|
|
}: Readonly<PillProps>){
|
|
return (
|
|
<div
|
|
data-testid="mattrixwv-pill"
|
|
className={clsx(
|
|
className,
|
|
"px-2 text-sm whitespace-nowrap",
|
|
{
|
|
"rounded-sm": rounding === "sm",
|
|
"rounded": rounding === "md",
|
|
"rounded-lg": rounding === "lg",
|
|
"rounded-full": rounding === "full"
|
|
}
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|