Add alias for imports
Signed-off-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
1253145d3b
commit
faf1ce0eb9
@@ -29,6 +29,7 @@ type Props = PropsWithChildren<
|
||||
variant?: "default" | "editor" | "dashed";
|
||||
invalid?: boolean;
|
||||
disabled?: boolean;
|
||||
className?: string;
|
||||
} & Omit<ComponentProps<typeof Root>, "onChange">
|
||||
>;
|
||||
|
||||
@@ -112,11 +113,11 @@ export function Select({
|
||||
|
||||
return (
|
||||
<Root onValueChange={onValueChange} value={value}>
|
||||
<Trigger className={trigger({ ...props })} {...props}>
|
||||
<Trigger {...props} className={trigger({ ...props })}>
|
||||
<div className="text-ellipsis overflow-hidden">
|
||||
<Value placeholder={placeholder}>
|
||||
{valueNode ? (
|
||||
<span className="flex items-center gap-2">
|
||||
<span className="flex items-center gap-2 overflow-hidden text-ellipsis w-full">
|
||||
{valueNode}
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
@@ -19,8 +19,15 @@ export function Thead({ children }: PropsWithChildren) {
|
||||
);
|
||||
}
|
||||
|
||||
export function Th({ children }: PropsWithChildren) {
|
||||
return <th className="first:pl-6 last:pr-6 py-3">{children}</th>;
|
||||
export function Th({
|
||||
children,
|
||||
className,
|
||||
}: PropsWithChildren<{ className?: string }>) {
|
||||
return (
|
||||
<th className={clsx("first:pl-6 last:pr-6 py-3", className)}>
|
||||
{children}
|
||||
</th>
|
||||
);
|
||||
}
|
||||
|
||||
const TrContext = createContext({} as { to?: string });
|
||||
@@ -54,7 +61,7 @@ export function Td({
|
||||
}: PropsWithChildren<{ noLink?: boolean }>) {
|
||||
const { to } = useContext(TrContext);
|
||||
if (!to || noLink) {
|
||||
return <td className="first:pl-6 py-3">{children}</td>;
|
||||
return <td className="first:pl-6 last:pr-6 py-3">{children}</td>;
|
||||
}
|
||||
return (
|
||||
<td className="first:*:pl-6 *:block last:*:pr-6 py-3">
|
||||
|
||||
@@ -8,12 +8,12 @@ type Props = {
|
||||
const badgeVariant = (level: string | number) => {
|
||||
if (typeof level === "number") {
|
||||
if (level >= 15) {
|
||||
return "CRITICAL";
|
||||
level = "CRITICAL";
|
||||
} else if (level >= 8) {
|
||||
level = "HIGH";
|
||||
} else {
|
||||
level = "LOW";
|
||||
}
|
||||
if (level >= 8) {
|
||||
return "HIGH";
|
||||
}
|
||||
return "LOW";
|
||||
}
|
||||
switch (level) {
|
||||
case "CRITICAL":
|
||||
|
||||
Reference in New Issue
Block a user