-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ setOpenGallery(true)}
+ open={openGallery}
+ onOpenChange={setOpenGallery}
+ value="gallery"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
}
diff --git a/src/components/layout/sidebar/stage-settings/stage-background.tsx b/src/components/layout/sidebar/stage-settings/stage-background.tsx
new file mode 100644
index 0000000..e7a595f
--- /dev/null
+++ b/src/components/layout/sidebar/stage-settings/stage-background.tsx
@@ -0,0 +1,28 @@
+import React, { useState } from "react";
+import { Label } from "@/components/ui/label";
+import { useAppDispatch, useAppSelector } from "@/hooks";
+import { selectBackground } from "@/store/app.slice";
+
+export const StageBackground = () => {
+ const dispatch = useAppDispatch();
+ const bgColor = useAppSelector((state) => state.app.backgroundColor);
+
+ const handleBackgroundSelect = (color: string) => {
+ dispatch(selectBackground(color));
+ };
+ return (
+
+
+
+ );
+};
diff --git a/src/components/layout/sidebar/stage-settings/stage-size.tsx b/src/components/layout/sidebar/stage-settings/stage-size.tsx
new file mode 100644
index 0000000..0b82d90
--- /dev/null
+++ b/src/components/layout/sidebar/stage-settings/stage-size.tsx
@@ -0,0 +1,42 @@
+import React, { useState } from "react";
+import { Card, CardHeader, CardTitle } from "@/components/ui/card";
+import { Button } from "@/components/ui/button";
+import { useAppDispatch } from "@/hooks";
+import { updateStage } from "@/store/app.slice";
+
+export const StageSize = () => {
+ const dispatch = useAppDispatch();
+
+ const handleStageSizeSelect = (
+ width: number | undefined,
+ height: number | undefined,
+ ) => {
+ dispatch(updateStage({ width, height }));
+ };
+ return (
+
+
+ {`Sélectionnez la taille d'étiquette`}
+
+
+
+
+
+
+
+
+ {/**/}
+ {/* */}
+ {/* */}
+ {/**/}
+
+ );
+};
diff --git a/src/components/layout/sidebar/text-input.tsx b/src/components/layout/sidebar/text-input.tsx
index 873c75d..734875a 100644
--- a/src/components/layout/sidebar/text-input.tsx
+++ b/src/components/layout/sidebar/text-input.tsx
@@ -8,7 +8,13 @@ import { Textarea } from "@/components/ui/textarea";
import { Button } from "@/components/ui/button";
import { addText } from "@/store/app.slice";
import { useAppDispatch } from "@/hooks";
-import { Card, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
+import {
+ Card,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
import { RxText } from "react-icons/rx";
export function TextInput() {
@@ -51,6 +57,9 @@ export function TextInput() {
+
+ Téléchargez votre image et ajoutez-la à votre étiquette.
+
diff --git a/src/components/layout/sidebar/text-input/text-input.tsx b/src/components/layout/sidebar/text-input/text-input.tsx
new file mode 100644
index 0000000..4d62c51
--- /dev/null
+++ b/src/components/layout/sidebar/text-input/text-input.tsx
@@ -0,0 +1,45 @@
+import React, { type ChangeEvent, useState } from "react";
+import {
+ Card,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Textarea } from "@/components/ui/textarea";
+import { Button } from "@/components/ui/button";
+import { addText } from "@/store/app.slice";
+import { useAppDispatch } from "@/hooks";
+
+export default function TextInput() {
+ const dispatch = useAppDispatch();
+ const [inputText, setInputText] = useState("");
+ const handleTextAdd = () => {
+ dispatch(addText({ initialValue: inputText }));
+ };
+ const handleInputChange = (e: ChangeEvent
) => {
+ setInputText(e.target.value);
+ };
+ return (
+
+
+ Text
+
+
+
+
+
+
+
+
+ Téléchargez votre image et ajoutez-la à votre étiquette.
+
+
+ );
+}
diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx
index f57fffd..a43638e 100644
--- a/src/components/ui/tabs.tsx
+++ b/src/components/ui/tabs.tsx
@@ -1,9 +1,9 @@
-import * as React from "react"
-import * as TabsPrimitive from "@radix-ui/react-tabs"
+import * as React from "react";
+import * as TabsPrimitive from "@radix-ui/react-tabs";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
-const Tabs = TabsPrimitive.Root
+const Tabs = TabsPrimitive.Root;
const TabsList = React.forwardRef<
React.ElementRef,
@@ -12,13 +12,13 @@ const TabsList = React.forwardRef<
-))
-TabsList.displayName = TabsPrimitive.List.displayName
+));
+TabsList.displayName = TabsPrimitive.List.displayName;
const TabsTrigger = React.forwardRef<
React.ElementRef,
@@ -28,12 +28,12 @@ const TabsTrigger = React.forwardRef<
ref={ref}
className={cn(
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
- className
+ className,
)}
{...props}
/>
-))
-TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
+));
+TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
const TabsContent = React.forwardRef<
React.ElementRef,
@@ -43,11 +43,11 @@ const TabsContent = React.forwardRef<
ref={ref}
className={cn(
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
- className
+ className,
)}
{...props}
/>
-))
-TabsContent.displayName = TabsPrimitive.Content.displayName
+));
+TabsContent.displayName = TabsPrimitive.Content.displayName;
-export { Tabs, TabsList, TabsTrigger, TabsContent }
+export { Tabs, TabsList, TabsTrigger, TabsContent };