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() { - <>} /> - + <>} /> + - - - + + + Dashboard - - + + Products - - + + Users list - - + + Sign in - - + + Sign up - - - - + + + + Docs - - + + Components - - + + Help - - - + + + - + ); } -`; - -function Component() { - const [isOpen, setIsOpen] = useState(true); - - const handleClose = () => setIsOpen(false); - - return ( -
-
- -
- - <>} /> - - -
-
-
- - - - - - 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() {
-
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() {
-
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 ( -
-
-
- - <>} /> - - -
-
-
- - - - - - 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() {
- - + +

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 ( -
-
- -
- - - -

- 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() { - - + +