diff --git a/apps/web/examples/drawer/drawer.backdrop.tsx b/apps/web/examples/drawer/drawer.backdrop.tsx
index fc0b7b760..24172680a 100644
--- a/apps/web/examples/drawer/drawer.backdrop.tsx
+++ b/apps/web/examples/drawer/drawer.backdrop.tsx
@@ -1,17 +1,6 @@
"use client";
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
- theme,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -24,18 +13,12 @@ import {
HiShoppingBag,
HiUsers,
} from "react-icons/hi";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
"use client";
-import {
- Button,
- Drawer,
- Sidebar,
- TextInput,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -49,7 +32,7 @@ import {
HiUsers,
} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -110,32 +93,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
-} from "flowbite-react";
-import { useState } from "react";
-import {
- HiChartPie,
- HiClipboard,
- HiCollection,
- HiInformationCircle,
- HiLogin,
- HiPencil,
- HiSearch,
- HiShoppingBag,
- HiUsers,
-} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -146,8 +105,8 @@ function Component() {
setIsOpen(true)}>Show navigation
- <>>} />
-
+ <>>} />
+
-
-
-
+
+
+
Dashboard
-
-
+
+
Products
-
-
+
+
Users list
-
-
+
+
Sign in
-
-
+
+
Sign up
-
-
-
-
+
+
+
+
Docs
-
-
+
+
Components
-
-
+
+
Help
-
-
-
+
+
+
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show drawer with backdrop
-
-
- <>>} />
-
-
-
-
-
-
-
-
- Dashboard
-
-
- Products
-
-
- Users list
-
-
- Sign in
-
-
- Sign up
-
-
-
-
- Docs
-
-
- Components
-
-
- Help
-
-
-
-
-
-
-
-
-
- );
-}
export const backdrop: CodeData = {
type: "single",
@@ -281,12 +163,8 @@ export const backdrop: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.backdrop.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.bodyScrolling.tsx b/apps/web/examples/drawer/drawer.bodyScrolling.tsx
index b387fa0ae..39020a638 100644
--- a/apps/web/examples/drawer/drawer.bodyScrolling.tsx
+++ b/apps/web/examples/drawer/drawer.bodyScrolling.tsx
@@ -1,17 +1,6 @@
"use client";
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
- theme,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -24,18 +13,12 @@ import {
HiShoppingBag,
HiUsers,
} from "react-icons/hi";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
"use client";
-import {
- Button,
- Drawer,
- Sidebar,
- TextInput,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -49,7 +32,7 @@ import {
HiUsers,
} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -58,7 +41,7 @@ function Component() {
setIsOpen(true)}>Show body scrolling
-
Testing scroll
+
<>>} />
@@ -111,32 +94,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
-} from "flowbite-react";
-import { useState } from "react";
-import {
- HiChartPie,
- HiClipboard,
- HiCollection,
- HiInformationCircle,
- HiLogin,
- HiPencil,
- HiSearch,
- HiShoppingBag,
- HiUsers,
-} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -145,132 +104,7 @@ function Component() {
setIsOpen(true)}>Show body scrolling
-
Testing scroll
-
-
- <>>} />
-
-
-
-
-
-
-
-
- Dashboard
-
-
- Products
-
-
- Users list
-
-
- Sign in
-
-
- Sign up
-
-
-
-
- Docs
-
-
- Components
-
-
- Help
-
-
-
-
-
-
-
-
-
- );
-}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show body scrolling
-
- <>>} />
-
-
-
-
-
-
-
-
- Dashboard
-
-
- Products
-
-
- Users list
-
-
- Sign in
-
-
- Sign up
-
-
-
-
- Docs
-
-
- Components
-
-
- Help
-
-
-
-
-
-
-
-
@@ -331,6 +165,53 @@ function Component() {
Loading...
+
+ <>>} />
+
+
+
+
+
+
+
+
+ Dashboard
+
+
+ Products
+
+
+ Users list
+
+
+ Sign in
+
+
+ Sign up
+
+
+
+
+ Docs
+
+
+ Components
+
+
+ Help
+
+
+
+
+
+
+
+
);
}
@@ -343,12 +224,8 @@ export const bodyScrolling: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.bodyScrolling.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.bottom.tsx b/apps/web/examples/drawer/drawer.bottom.tsx
index 9a4af82a0..ac1c3848b 100644
--- a/apps/web/examples/drawer/drawer.bottom.tsx
+++ b/apps/web/examples/drawer/drawer.bottom.tsx
@@ -1,8 +1,7 @@
"use client";
-import { Button, Drawer, DrawerHeader, DrawerItems, theme } from "flowbite-react";
+import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
@@ -11,7 +10,7 @@ const code = `
import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -67,11 +66,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import { Button, Drawer, DrawerHeader, DrawerItems } from "flowbite-react";
-import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -82,8 +78,8 @@ function Component() {
setIsOpen(true)}>Show bottom drawer
-
-
+
+
Supercharge your hiring by taking advantage of our
@@ -121,78 +117,11 @@ function Component() {
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show bottom drawer
-
-
-
-
-
- Supercharge your hiring by taking advantage of our
-
- limited-time sale
-
- for Flowbite Docs + Job Board. Unlimited access to over 190K top-ranked candidates and the #1 design
- job board.
-
-
-
-
-
- );
-}
export const bottom: CodeData = {
type: "single",
@@ -202,12 +131,8 @@ export const bottom: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.bottom.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.contactForm.tsx b/apps/web/examples/drawer/drawer.contactForm.tsx
index c243ab416..6f3420c45 100644
--- a/apps/web/examples/drawer/drawer.contactForm.tsx
+++ b/apps/web/examples/drawer/drawer.contactForm.tsx
@@ -1,9 +1,8 @@
"use client";
-import { Button, Drawer, DrawerHeader, DrawerItems, Label, Textarea, TextInput, theme } from "flowbite-react";
+import { Button, Drawer, Label, Textarea, TextInput } from "flowbite-react";
import { useState } from "react";
import { HiEnvelope } from "react-icons/hi2";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
@@ -13,7 +12,7 @@ import { Button, Drawer, Label, Textarea, TextInput } from "flowbite-react";
import { useState } from "react";
import { HiEnvelope } from "react-icons/hi2";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -67,20 +66,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Label,
- Textarea,
- TextInput
-} from "flowbite-react";
-import { useState } from "react";
-import { HiEnvelope } from "react-icons/hi2";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -91,8 +78,8 @@ function Component() {
setIsOpen(true)}>Show contact form
-
-
+
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show drawer
-
-
-
-
-
-
-
- Title
-
-
-
-
-
- Description
-
-
-
-
-
-
-
- (
-
-
- Add
-
- )}
- theme={{
- field: {
- rightIcon: {
- base: twMerge(theme.textInput.field.rightIcon.base, "pointer-events-auto"),
- },
- },
- }}
- />
-
-
-
-
-
-
-
-
-
- Create event
-
-
-
-
-
- );
-}
export const formElements: CodeData = {
type: "single",
@@ -278,12 +157,8 @@ export const formElements: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.formElements.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.left.tsx b/apps/web/examples/drawer/drawer.left.tsx
index ae9d48818..7a14928dc 100644
--- a/apps/web/examples/drawer/drawer.left.tsx
+++ b/apps/web/examples/drawer/drawer.left.tsx
@@ -1,8 +1,7 @@
"use client";
-import { Button, Drawer, DrawerHeader, DrawerItems, theme } from "flowbite-react";
+import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
@@ -11,7 +10,7 @@ const code = `
import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -67,11 +66,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import { Button, Drawer, DrawerHeader, DrawerItems } from "flowbite-react";
-import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -82,8 +78,8 @@ function Component() {
setIsOpen(true)}>Show left drawer
-
-
+
+
Supercharge your hiring by taking advantage of our
@@ -121,84 +117,11 @@ function Component() {
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show left drawer
-
-
-
-
-
- Supercharge your hiring by taking advantage of our
-
- limited-time sale
-
- for Flowbite Docs + Job Board. Unlimited access to over 190K top-ranked candidates and the #1 design
- job board.
-
-
-
-
-
- );
-}
export const left: CodeData = {
type: "single",
@@ -208,12 +131,8 @@ export const left: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.left.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.navigation.tsx b/apps/web/examples/drawer/drawer.navigation.tsx
index 2f8a4c025..d5b3faf95 100644
--- a/apps/web/examples/drawer/drawer.navigation.tsx
+++ b/apps/web/examples/drawer/drawer.navigation.tsx
@@ -1,17 +1,6 @@
"use client";
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
- theme,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -24,18 +13,12 @@ import {
HiShoppingBag,
HiUsers,
} from "react-icons/hi";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
"use client";
-import {
- Button,
- Drawer,
- Sidebar,
- TextInput,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -49,7 +32,7 @@ import {
HiUsers,
} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -110,32 +93,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
-} from "flowbite-react";
-import { useState } from "react";
-import {
- HiChartPie,
- HiClipboard,
- HiCollection,
- HiInformationCircle,
- HiLogin,
- HiPencil,
- HiSearch,
- HiShoppingBag,
- HiUsers,
-} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -146,8 +105,8 @@ function Component() {
setIsOpen(true)}>Show navigation
- <>>} />
-
+ <>>} />
+
-
-
-
+
+
+
Dashboard
-
-
+
+
Products
-
-
+
+
Users list
-
-
+
+
Sign in
-
-
+
+
Sign up
-
-
-
-
+
+
+
+
Docs
-
-
+
+
Components
-
-
+
+
Help
-
-
-
+
+
+
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show navigation
-
-
- <>>} />
-
-
-
-
-
-
-
-
-
-
- Dashboard
-
-
- Products
-
-
- Users list
-
-
- Sign in
-
-
- Sign up
-
-
-
-
- Docs
-
-
- Components
-
-
- Help
-
-
-
-
-
-
-
-
-
- );
-}
export const navigation: CodeData = {
type: "single",
@@ -281,12 +163,8 @@ export const navigation: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.navigation.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.noBackdrop.tsx b/apps/web/examples/drawer/drawer.noBackdrop.tsx
index 68656f0a4..a3024aebd 100644
--- a/apps/web/examples/drawer/drawer.noBackdrop.tsx
+++ b/apps/web/examples/drawer/drawer.noBackdrop.tsx
@@ -1,17 +1,6 @@
"use client";
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
- theme,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -24,18 +13,12 @@ import {
HiShoppingBag,
HiUsers,
} from "react-icons/hi";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
"use client";
-import {
- Button,
- Drawer,
- Sidebar,
- TextInput,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -49,7 +32,7 @@ import {
HiUsers,
} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -110,32 +93,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
-} from "flowbite-react";
-import { useState } from "react";
-import {
- HiChartPie,
- HiClipboard,
- HiCollection,
- HiInformationCircle,
- HiLogin,
- HiPencil,
- HiSearch,
- HiShoppingBag,
- HiUsers,
-} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -146,8 +105,8 @@ function Component() {
setIsOpen(true)}>Show navigation
- <>>} />
-
+ <>>} />
+
-
-
-
+
+
+
Dashboard
-
-
+
+
Products
-
-
+
+
Users list
-
-
+
+
Sign in
-
-
+
+
Sign up
-
-
-
-
+
+
+
+
Docs
-
-
+
+
Components
-
-
+
+
Help
-
-
-
+
+
+
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show drawer without backdrop
-
-
- <>>} />
-
-
-
-
-
-
-
-
-
-
- Dashboard
-
-
- Products
-
-
- Users list
-
-
- Sign in
-
-
- Sign up
-
-
-
-
- Docs
-
-
- Components
-
-
- Help
-
-
-
-
-
-
-
-
-
- );
-}
export const noBackdrop: CodeData = {
type: "single",
@@ -281,12 +163,8 @@ export const noBackdrop: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.noBackdrop.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.noBodyScrolling.tsx b/apps/web/examples/drawer/drawer.noBodyScrolling.tsx
index 731bd8199..71c2e3f7d 100644
--- a/apps/web/examples/drawer/drawer.noBodyScrolling.tsx
+++ b/apps/web/examples/drawer/drawer.noBodyScrolling.tsx
@@ -1,17 +1,6 @@
"use client";
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
- theme,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -24,18 +13,12 @@ import {
HiShoppingBag,
HiUsers,
} from "react-icons/hi";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
"use client";
-import {
- Button,
- Drawer,
- Sidebar,
- TextInput,
-} from "flowbite-react";
+import { Button, Drawer, Sidebar, TextInput } from "flowbite-react";
import { useState } from "react";
import {
HiChartPie,
@@ -49,7 +32,7 @@ import {
HiUsers,
} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -110,32 +93,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import {
- Button,
- Drawer,
- DrawerHeader,
- DrawerItems,
- Sidebar,
- SidebarItem,
- SidebarItemGroup,
- SidebarItems,
- TextInput,
-} from "flowbite-react";
-import { useState } from "react";
-import {
- HiChartPie,
- HiClipboard,
- HiCollection,
- HiInformationCircle,
- HiLogin,
- HiPencil,
- HiSearch,
- HiShoppingBag,
- HiUsers,
-} from "react-icons/hi";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -146,8 +105,8 @@ function Component() {
setIsOpen(true)}>Show navigation
- <>>} />
-
+ <>>} />
+
-
-
-
+
+
+
Dashboard
-
-
+
+
Products
-
-
+
+
Users list
-
-
+
+
Sign in
-
-
+
+
Sign up
-
-
-
-
+
+
+
+
Docs
-
-
+
+
Components
-
-
+
+
Help
-
-
-
+
+
+
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show body scrolling disabled
-
-
- <>>} />
-
-
-
-
-
-
-
-
-
-
- Dashboard
-
-
- Products
-
-
- Users list
-
-
- Sign in
-
-
- Sign up
-
-
-
-
- Docs
-
-
- Components
-
-
- Help
-
-
-
-
-
-
-
-
-
- );
-}
export const noBodyScrolling: CodeData = {
type: "single",
@@ -281,12 +163,8 @@ export const noBodyScrolling: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.noBodyScrolling.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.right.tsx b/apps/web/examples/drawer/drawer.right.tsx
index ecc2c254f..ac6641e30 100644
--- a/apps/web/examples/drawer/drawer.right.tsx
+++ b/apps/web/examples/drawer/drawer.right.tsx
@@ -1,8 +1,7 @@
"use client";
-import { Button, Drawer, DrawerHeader, DrawerItems, theme } from "flowbite-react";
+import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
@@ -11,7 +10,7 @@ const code = `
import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -67,11 +66,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import { Button, Drawer, DrawerHeader, DrawerItems } from "flowbite-react";
-import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -82,8 +78,8 @@ function Component() {
setIsOpen(true)}>Show right drawer
-
-
+
+
Supercharge your hiring by taking advantage of our
@@ -121,84 +117,11 @@ function Component() {
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show right drawer
-
-
-
-
-
- Supercharge your hiring by taking advantage of our
-
- limited-time sale
-
- for Flowbite Docs + Job Board. Unlimited access to over 190K top-ranked candidates and the #1 design
- job board.
-
-
-
-
-
- );
-}
export const right: CodeData = {
type: "single",
@@ -208,12 +131,8 @@ export const right: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.right.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.root.tsx b/apps/web/examples/drawer/drawer.root.tsx
index 9f62f5c67..d4865613a 100644
--- a/apps/web/examples/drawer/drawer.root.tsx
+++ b/apps/web/examples/drawer/drawer.root.tsx
@@ -1,8 +1,7 @@
"use client";
-import { Button, Drawer, DrawerHeader, DrawerItems, theme } from "flowbite-react";
+import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
@@ -11,7 +10,7 @@ const code = `
import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -67,11 +66,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import { Button, Drawer, DrawerHeader, DrawerItems } from "flowbite-react";
-import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -82,8 +78,8 @@ function Component() {
setIsOpen(true)}>Show drawer
-
-
+
+
Supercharge your hiring by taking advantage of our
@@ -121,83 +117,11 @@ function Component() {
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show drawer
-
-
-
-
-
- Supercharge your hiring by taking advantage of our
-
- limited-time sale
-
- for Flowbite Docs + Job Board. Unlimited access to over 190K top-ranked candidates and the #1 design
- job board.
-
-
-
-
-
- );
-}
export const root: CodeData = {
type: "single",
@@ -207,12 +131,8 @@ export const root: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.root.tsx",
component: ,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.swipeableEdge.tsx b/apps/web/examples/drawer/drawer.swipeableEdge.tsx
index 7a592174e..cbffc616e 100644
--- a/apps/web/examples/drawer/drawer.swipeableEdge.tsx
+++ b/apps/web/examples/drawer/drawer.swipeableEdge.tsx
@@ -1,9 +1,8 @@
"use client";
-import { Button, Drawer, DrawerHeader, DrawerItems, theme } from "flowbite-react";
+import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
import { HiBars2, HiSquaresPlus } from "react-icons/hi2";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
@@ -13,7 +12,7 @@ import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
import { HiBars2, HiSquaresPlus } from "react-icons/hi2";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -101,9 +100,9 @@ function Component() {
>
@@ -149,9 +148,9 @@ function Component() {
>
@@ -165,12 +164,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import { Button, Drawer, DrawerHeader, DrawerItems } from "flowbite-react";
-import { useState } from "react";
-import { HiBars2, HiSquaresPlus } from "react-icons/hi2";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -181,14 +176,14 @@ function Component() {
setIsOpen(true)}>Show swipeable drawer
- setIsOpen(!isOpen)}
className="cursor-pointer px-4 pt-4 hover:bg-gray-50 dark:hover:bg-gray-700"
/>
-
+
@@ -258,9 +253,9 @@ function Component() {
>
@@ -306,9 +301,9 @@ function Component() {
>
@@ -316,175 +311,11 @@ function Component() {
Custom
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show swipeable drawer
-
-
- setIsOpen(!isOpen)}
- className="cursor-pointer px-4 pt-4 hover:bg-gray-50 dark:hover:bg-gray-700"
- />
-
-
-
-
-
- );
-}
export const swipeableEdge: CodeData = {
type: "single",
@@ -494,12 +325,8 @@ export const swipeableEdge: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.swipeableEdge.tsx",
component:
,
+ iframe: 600,
};
diff --git a/apps/web/examples/drawer/drawer.top.tsx b/apps/web/examples/drawer/drawer.top.tsx
index da798ba76..4322493ed 100644
--- a/apps/web/examples/drawer/drawer.top.tsx
+++ b/apps/web/examples/drawer/drawer.top.tsx
@@ -1,8 +1,7 @@
"use client";
-import { Button, Drawer, DrawerHeader, DrawerItems, theme } from "flowbite-react";
+import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-import { twMerge } from "tailwind-merge";
import type { CodeData } from "~/components/code-demo";
const code = `
@@ -11,7 +10,7 @@ const code = `
import { Button, Drawer } from "flowbite-react";
import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -67,11 +66,8 @@ function Component() {
);
}
`;
-const codeRSC = `
-import { Button, Drawer, DrawerHeader, DrawerItems } from "flowbite-react";
-import { useState } from "react";
-function Component() {
+export function Component() {
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => setIsOpen(false);
@@ -82,8 +78,8 @@ function Component() {
setIsOpen(true)}>Show top drawer
-
-
+
+
Supercharge your hiring by taking advantage of our
@@ -121,78 +117,11 @@ function Component() {
-
+
>
);
}
-`;
-
-function Component() {
- const [isOpen, setIsOpen] = useState(true);
-
- const handleClose = () => setIsOpen(false);
-
- return (
-
-
- setIsOpen(true)}>Show top drawer
-
-
-
-
-
- Supercharge your hiring by taking advantage of our
-
- limited-time sale
-
- for Flowbite Docs + Job Board. Unlimited access to over 190K top-ranked candidates and the #1 design
- job board.
-
-
-
-
-
- );
-}
export const top: CodeData = {
type: "single",
@@ -202,12 +131,8 @@ export const top: CodeData = {
language: "tsx",
code,
},
- {
- fileName: "server",
- language: "tsx",
- code: codeRSC,
- },
],
githubSlug: "drawer/drawer.top.tsx",
component: ,
+ iframe: 600,
};