Skip to content

Commit d17291a

Browse files
committed
Add support for port ranges
1 parent 8a08583 commit d17291a

File tree

13 files changed

+495
-265
lines changed

13 files changed

+495
-265
lines changed

src/components/Callout.tsx

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
11
import { cn } from "@utils/helpers";
2+
import { cva, VariantProps } from "class-variance-authority";
23
import { InfoIcon } from "lucide-react";
34
import * as React from "react";
45

6+
type CalloutVariants = VariantProps<typeof calloutVariants>;
7+
58
type Props = {
69
icon?: React.ReactNode;
710
children?: React.ReactNode;
811
className?: string;
9-
};
12+
} & CalloutVariants;
13+
14+
export const calloutVariants = cva(
15+
["px-4 py-3.5 rounded-md border text-sm font-normal flex gap-3 font-light"],
16+
{
17+
variants: {
18+
variant: {
19+
default: "bg-nb-gray-900/60 border-nb-gray-800/80 text-nb-gray-300",
20+
warning: "bg-netbird-500/10 border-netbird-400/20 text-netbird-150",
21+
info: "bg-sky-400/10 border-sky-400/20 text-sky-100",
22+
},
23+
},
24+
},
25+
);
1026

1127
export const Callout = ({
1228
children,
13-
icon = <InfoIcon size={14} className={"shrink-0 relative top-[1px]"} />,
29+
icon = <InfoIcon size={14} className={"shrink-0 relative top-[2px]"} />,
1430
className,
31+
variant = "default",
1532
}: Props) => {
1633
return (
17-
<div
18-
className={cn(
19-
"px-4 py-3 rounded-md border text-sm font-normal flex gap-3",
20-
"bg-nb-gray-900/60 border-nb-gray-800/80 text-nb-gray-300",
21-
className,
22-
)}
23-
>
34+
<div className={cn(calloutVariants({ variant }), className)}>
2435
{icon}
2536
<div>{children}</div>
2637
</div>

0 commit comments

Comments
 (0)