-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathV4Badge.tsx
More file actions
26 lines (24 loc) · 668 Bytes
/
V4Badge.tsx
File metadata and controls
26 lines (24 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { cn } from "~/utils/cn";
import { Badge } from "./primitives/Badge";
import { SimpleTooltip } from "./primitives/Tooltip";
export function V4Badge({ inline = false, className }: { inline?: boolean; className?: string }) {
return (
<SimpleTooltip
button={
<Badge variant="extra-small" className={cn(inline ? "inline-grid" : "", className)}>
V4
</Badge>
}
content="This feature is only available in V4 and above."
disableHoverableContent
/>
);
}
export function V4Title({ children }: { children: React.ReactNode }) {
return (
<>
<span>{children}</span>
<V4Badge />
</>
);
}