Add pill component
This commit is contained in:
26
lib/component/pill/Pill.tsx
Normal file
26
lib/component/pill/Pill.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user