componenets standardization 1
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { ReactNode, useState, useEffect } from 'react';
|
||||
import Button from '../ui/button/Button';
|
||||
import TextArea from '../form/input/TextArea';
|
||||
import Select from '../form/Select';
|
||||
import Label from '../form/Label';
|
||||
import { useToast } from '../ui/toast/ToastContainer';
|
||||
import { fetchAPI } from '../../services/api';
|
||||
|
||||
@@ -292,14 +295,13 @@ export default function ImageGenerationCard({
|
||||
|
||||
{/* Prompt Description - Full Width */}
|
||||
<div>
|
||||
<label className="mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<Label className="mb-2">
|
||||
Prompt Description *
|
||||
</label>
|
||||
<textarea
|
||||
</Label>
|
||||
<TextArea
|
||||
value={prompt}
|
||||
onChange={(e) => setPrompt(e.target.value)}
|
||||
onChange={(val) => setPrompt(val)}
|
||||
rows={6}
|
||||
className="w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white"
|
||||
placeholder="Describe the visual elements, style, mood, and composition you want in the image..."
|
||||
/>
|
||||
<p className="mt-1 text-xs text-gray-500 dark:text-gray-400">
|
||||
@@ -309,14 +311,13 @@ export default function ImageGenerationCard({
|
||||
|
||||
{/* Negative Prompt - Small */}
|
||||
<div>
|
||||
<label className="mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<Label className="mb-2">
|
||||
Negative Prompt
|
||||
</label>
|
||||
<textarea
|
||||
</Label>
|
||||
<TextArea
|
||||
value={negativePrompt}
|
||||
onChange={(e) => setNegativePrompt(e.target.value)}
|
||||
onChange={(val) => setNegativePrompt(val)}
|
||||
rows={2}
|
||||
className="w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white"
|
||||
placeholder="Describe what you DON'T want in the image..."
|
||||
/>
|
||||
<p className="mt-1 text-xs text-gray-500 dark:text-gray-400">
|
||||
@@ -328,56 +329,38 @@ export default function ImageGenerationCard({
|
||||
<div className="grid grid-cols-3 gap-4">
|
||||
{/* Image Type */}
|
||||
<div>
|
||||
<label className="mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<Label className="mb-2">
|
||||
Image Type
|
||||
</label>
|
||||
<select
|
||||
value={imageType}
|
||||
onChange={(e) => setImageType(e.target.value)}
|
||||
className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white"
|
||||
>
|
||||
{typeOptions.map((option) => (
|
||||
<option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</Label>
|
||||
<Select
|
||||
options={typeOptions}
|
||||
defaultValue={imageType}
|
||||
onChange={(val) => setImageType(val)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Image Size */}
|
||||
<div>
|
||||
<label className="mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<Label className="mb-2">
|
||||
Image Size
|
||||
</label>
|
||||
<select
|
||||
value={imageSize}
|
||||
onChange={(e) => setImageSize(e.target.value)}
|
||||
className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white"
|
||||
>
|
||||
{sizeOptions.map((option) => (
|
||||
<option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</Label>
|
||||
<Select
|
||||
options={sizeOptions}
|
||||
defaultValue={imageSize}
|
||||
onChange={(val) => setImageSize(val)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Image Format */}
|
||||
<div>
|
||||
<label className="mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<Label className="mb-2">
|
||||
Image Format
|
||||
</label>
|
||||
<select
|
||||
value={imageFormat}
|
||||
onChange={(e) => setImageFormat(e.target.value)}
|
||||
className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white"
|
||||
>
|
||||
{formatOptions.map((option) => (
|
||||
<option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</Label>
|
||||
<Select
|
||||
options={formatOptions}
|
||||
defaultValue={imageFormat}
|
||||
onChange={(val) => setImageFormat(val)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user