diff --git a/frontend/bun.lockb b/frontend/bun.lockb index eea2418..188bb3b 100644 Binary files a/frontend/bun.lockb and b/frontend/bun.lockb differ diff --git a/frontend/package.json b/frontend/package.json index 0cb2a08..8a6ed85 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,6 +14,7 @@ "@it-incubator/prettier-config": "^0.1.2", "@radix-ui/react-dialog": "^1.1.1", "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-select": "^2.1.1", "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-switch": "^1.1.0", diff --git a/frontend/src/components/settings-dialog.tsx b/frontend/src/components/settings-dialog.tsx index 844cd0d..b7f792f 100644 --- a/frontend/src/components/settings-dialog.tsx +++ b/frontend/src/components/settings-dialog.tsx @@ -9,6 +9,7 @@ import { DialogTitle, DialogTrigger, Input, + Label, Switch, Table, TableBody, @@ -63,63 +64,89 @@ export function SettingsDialog() {
-
-

Pagination options

-

Add or remove options for the amount of rows per page

- - - {paginationOptions.map((option) => ( - - - {option} - - - - - - ))} - -
-
- - -
-
-
-

Automatically format dates

-

- When turned on, will show timestamp cells in tables in a human - readable format -

+
+
+ +

+ When turned on, will show timestamp cells in tables in a human + readable format +

+
-
-

Show previews for images

-

- When turned on, will automatically detect image URL's in tables - and add a preview alongside. -

-

- Might significantly increase load on you CDN, use with caution. -

+
+
+ +

+ When turned on, will automatically detect image URL's in tables + and add a preview alongside. +

+

+ Might significantly increase load on you CDN, use with caution. +

+
+
+
+ +

+ Add or remove options for the amount of rows per page +

+
+
+ + + {paginationOptions.map((option) => ( + + + {option} + + + + + + ))} + +
+
+ + +
+
+
diff --git a/frontend/src/components/ui/index.ts b/frontend/src/components/ui/index.ts index cc8ee6b..c67c98f 100644 --- a/frontend/src/components/ui/index.ts +++ b/frontend/src/components/ui/index.ts @@ -3,6 +3,7 @@ export * from "./data-table-pagination"; export * from "./dialog"; export * from "./dropdown-menu"; export * from "./input"; +export * from "./label"; export * from "./mode-toggle"; export * from "./select"; export * from "./switch"; diff --git a/frontend/src/components/ui/label.tsx b/frontend/src/components/ui/label.tsx new file mode 100644 index 0000000..683faa7 --- /dev/null +++ b/frontend/src/components/ui/label.tsx @@ -0,0 +1,24 @@ +import * as React from "react" +import * as LabelPrimitive from "@radix-ui/react-label" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const labelVariants = cva( + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" +) + +const Label = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & + VariantProps +>(({ className, ...props }, ref) => ( + +)) +Label.displayName = LabelPrimitive.Root.displayName + +export { Label }