diff --git a/src/components/ui/Alert.stories.tsx b/src/components/ui/Alert.stories.tsx
index c8df6b2..438524e 100644
--- a/src/components/ui/Alert.stories.tsx
+++ b/src/components/ui/Alert.stories.tsx
@@ -1,5 +1,29 @@
import type { Meta, StoryObj } from "@storybook/react";
-import { Alert, AlertTitle, AlertDescription } from "./alert";
+import React from "react";
+import {
+ AlertTriangle,
+ CheckCircle,
+ Info as InfoIcon,
+ X,
+ XCircle,
+} from "lucide-react";
+import { Alert, AlertAction, AlertDescription, AlertTitle } from "./alert";
+import { Button } from "./button";
+
+const VARIANT_ICONS = {
+ default: InfoIcon,
+ destructive: XCircle,
+ success: CheckCircle,
+ warning: AlertTriangle,
+ info: InfoIcon,
+} as const;
+
+type AlertVariant = keyof typeof VARIANT_ICONS;
+
+function AlertIcon({ variant }: { variant: AlertVariant }) {
+ const Icon = VARIANT_ICONS[variant] ?? InfoIcon;
+ return ;
+}
const meta = {
title: "UI/Alert",
@@ -19,8 +43,9 @@ export default meta;
type Story = StoryObj;
export const Default: Story = {
- render: () => (
-
+ args: { variant: "default" },
+ render: (args) => (
+ TitleDescription text goes here.
@@ -28,8 +53,9 @@ export const Default: Story = {
};
export const Destructive: Story = {
- render: () => (
-
+ args: { variant: "destructive" },
+ render: (args) => (
+ ErrorSomething went wrong.
@@ -37,21 +63,19 @@ export const Destructive: Story = {
};
export const Success: Story = {
- args: {
- variant: "default"
- },
-
- render: () => (
-
+ args: { variant: "success" },
+ render: (args) => (
+ SuccessYour changes have been saved.
- )
+ ),
};
export const Warning: Story = {
- render: () => (
-
+ args: { variant: "warning" },
+ render: (args) => (
+ WarningPlease review before continuing.
@@ -59,10 +83,90 @@ export const Warning: Story = {
};
export const Info: Story = {
- render: () => (
-
+ args: { variant: "info" },
+ render: (args) => (
+ InfoNew update available.
),
};
+
+const defaultVariant: AlertVariant = "default";
+
+export const WithDescription: Story = {
+ args: { variant: defaultVariant },
+ render: (args) => (
+
+
+ Hold on I need at least a few minutes!
+
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry.
+
+
+
+
+
+ ),
+};
+
+export const WithoutDescription: Story = {
+ args: { variant: defaultVariant },
+ render: (args) => (
+
+
+ Hold on I need at least a few minutes!
+
+
+
+
+ ),
+};
+
+export const WithButtons: Story = {
+ args: { variant: defaultVariant },
+ render: (args) => (
+
+
+
+ Hold on I need at least a few minutes!
+
+
+
+
+
+
+
+
+
+ ),
+};
+
+export const WithDescriptionAndButtons: Story = {
+ args: { variant: defaultVariant },
+ render: (args) => (
+
+
+ Hold on I need at least a few minutes!
+
+ This process may take a few minutes to complete. See the{" "}
+ documentation for more details.
+
+
+
+
+
+
+
+
+
+ ),
+};
diff --git a/src/components/ui/Modal.stories.tsx b/src/components/ui/Modal.stories.tsx
index a01a1a7..a907ae3 100644
--- a/src/components/ui/Modal.stories.tsx
+++ b/src/components/ui/Modal.stories.tsx
@@ -1,13 +1,34 @@
import type { Meta, StoryObj } from "@storybook/react";
-import { useState } from "react";
+import React, { useState } from "react";
import {
Modal,
ModalHeader,
ModalTitle,
- ModalDescription,
ModalFooter,
Button,
+ Input,
+ LabeledSwitch,
+ Field,
+ FieldLabel,
+ FieldDescription,
+ DropdownMenu,
+ DropdownMenuTrigger,
+ DropdownMenuContent,
+ DropdownMenuItem,
} from "./index";
+import { ChevronDownIcon } from "lucide-react";
+
+const ZONE_NAME_HELPER = "Give a meaningful name for your reference";
+
+const COUNTRIES = [
+ "Bangladesh",
+ "United States",
+ "United Kingdom",
+ "Canada",
+ "Australia",
+ "Germany",
+ "France",
+] as const;
function ModalDemo() {
const [open, setOpen] = useState(false);
@@ -17,11 +38,12 @@ function ModalDemo() {
setOpen(false)}>
Modal Title
- Description text here.