feat: implement state and components for text config

This commit is contained in:
2026-02-06 02:26:14 +05:00
parent a063a2d752
commit 5244de7cc0
11 changed files with 128 additions and 68 deletions
-48
View File
@@ -1,48 +0,0 @@
export type TextAlign = "left" | "center" | "right";
export interface TextItem {
id: string;
text: string;
fontSize: number;
fontFamily: string;
color: string;
textAlign: TextAlign;
paddingX: number;
verticalOffset: number;
}
export interface Panel {
id: string;
backgroundImage: string;
text: TextItem;
height: number;
createdAt: Date;
updatedAt: Date;
}
export interface ImageUploadResult {
success: boolean;
image?: string;
error?: string;
}
export interface CropOptions {
width: number;
height: number;
x?: number;
y?: number;
}
export interface ImageCropResult {
success: boolean;
croppedImage?: string;
error?: string;
}
export interface UIState {
isLoading: boolean;
error: string | undefined;
currentStep: "upload" | "crop" | "text" | "preview";
showCropModal: boolean;
showTextManager: boolean;
}
+3
View File
@@ -0,0 +1,3 @@
export type TextAlign = "left" | "center" | "right";
export type HexColor = `#${string}`;