feat(scans): add new component - alert bar

This commit is contained in:
Pablo Lara authored and GitHub committed 2025-01-08 11:01:52 +01:00
1 parent e8d66979b3
commit d2f338ceb6
9 files changed
+3692 -2687

No files matched your search

@@ -38,7 +38,9 @@ export const CustomRegionSelection: React.FC = () => {
className="w-full"
size="sm"
selectedKeys={selectedKeys}
onSelectionChange={(keys) => applyRegionFilter(Array.from(keys))}
onSelectionChange={(keys) =>
applyRegionFilter(Array.from(keys) as string[])
}
>
{regions.map((region) => (
<SelectItem key={region.key}>{region.label}</SelectItem>
+1
View File
@@ -2,3 +2,4 @@ export * from "./button-refresh-data";
export * from "./link-to-findings-from-scan";
export * from "./no-providers-added";
export * from "./no-providers-connected";
export * from "./scan-warning-bar";
+19
View File
@@ -0,0 +1,19 @@
import { Alert, cn } from "@nextui-org/react";
export const ScanWarningBar = () => {
return (
<Alert
color="warning"
title="Waiting for Your Scan to Show Up?"
description="Your scan is being processed and may take a few minutes to appear on the table. It will show up shortly."
variant="faded"
isClosable
classNames={{
base: cn([
"border-1 border-default-200 dark:border-default-100",
"gap-x-4",
]),
}}
/>
);
};
+3 -3
View File
@@ -1,9 +1,9 @@
import { UseRadioProps } from "@nextui-org/radio/dist/use-radio";
import { cn, useRadio, VisuallyHidden } from "@nextui-org/react";
import React from "react";
interface CustomRadioProps extends UseRadioProps {
interface CustomRadioProps {
description?: string;
value?: string;
children?: React.ReactNode;
}
@@ -18,7 +18,7 @@ export const CustomRadio: React.FC<CustomRadioProps> = (props) => {
getLabelProps,
getLabelWrapperProps,
getControlProps,
} = useRadio(props);
} = useRadio({ ...props, value: props.value || "" });
return (
<Component
+1 -1
View File
@@ -1,6 +1,6 @@
"use client";
import { Textarea } from "@nextui-org/input";
import { Textarea } from "@nextui-org/react";
import React from "react";
import { Control, FieldPath, FieldValues } from "react-hook-form";