aboutsummaryrefslogtreecommitdiff
path: root/packages/ui/components/text-separator.tsx
blob: 6e3e671b217244f52714c9cefad922e526cfd286 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { cn } from "@lib/utils";

interface TextSeparatorProps extends React.ComponentProps<"div"> {
	text: string;
}

export function TextSeparator({
	text,
	className,
	...props
}: TextSeparatorProps) {
	return (
		<div
			className={cn("flex gap-4 items-center justify-center", className)}
			{...props}
		>
			<div className="w-full h-px bg-border" />
			<span className="text-muted-foreground text-[0.75rem] uppercase tracking-[-0.2px] leading-[0.875rem]">
				{text}
			</span>
			<div className="w-full h-px bg-border" />
		</div>
	);
}