Refactor ChallengesSection component to utilize initial challenges and users data: Replace fetching logic with props for challenges and users, streamline challenge creation with a dedicated form component, and enhance UI for better user experience.
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m49s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m49s
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
Button,
|
||||
Input,
|
||||
Textarea,
|
||||
Select,
|
||||
Card,
|
||||
Badge,
|
||||
Alert,
|
||||
@@ -22,6 +23,7 @@ export default function StyleGuidePage() {
|
||||
const [modalOpen, setModalOpen] = useState(false);
|
||||
const [inputValue, setInputValue] = useState("");
|
||||
const [textareaValue, setTextareaValue] = useState("");
|
||||
const [selectValue, setSelectValue] = useState("");
|
||||
const [rating, setRating] = useState(0);
|
||||
|
||||
return (
|
||||
@@ -170,6 +172,74 @@ export default function StyleGuidePage() {
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
{/* Select */}
|
||||
<Card variant="dark" className="p-6 mb-8">
|
||||
<h2 className="text-2xl font-bold text-pixel-gold mb-6">Select</h2>
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h3 className="text-lg text-gray-300 mb-3">Basique</h3>
|
||||
<div className="max-w-md">
|
||||
<Select
|
||||
label="Sélectionner une option"
|
||||
value={selectValue}
|
||||
onChange={(e) => setSelectValue(e.target.value)}
|
||||
>
|
||||
<option value="">Choisir...</option>
|
||||
<option value="option1">Option 1</option>
|
||||
<option value="option2">Option 2</option>
|
||||
<option value="option3">Option 3</option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-lg text-gray-300 mb-3">Sans label</h3>
|
||||
<div className="max-w-md">
|
||||
<Select
|
||||
value={selectValue}
|
||||
onChange={(e) => setSelectValue(e.target.value)}
|
||||
>
|
||||
<option value="">Choisir...</option>
|
||||
<option value="option1">Option 1</option>
|
||||
<option value="option2">Option 2</option>
|
||||
<option value="option3">Option 3</option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-lg text-gray-300 mb-3">Avec erreur</h3>
|
||||
<div className="max-w-md">
|
||||
<Select
|
||||
label="Select avec erreur"
|
||||
value={selectValue}
|
||||
onChange={(e) => setSelectValue(e.target.value)}
|
||||
error="Veuillez sélectionner une option"
|
||||
>
|
||||
<option value="">Choisir...</option>
|
||||
<option value="option1">Option 1</option>
|
||||
<option value="option2">Option 2</option>
|
||||
<option value="option3">Option 3</option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-lg text-gray-300 mb-3">Disabled</h3>
|
||||
<div className="max-w-md">
|
||||
<Select
|
||||
label="Select désactivé"
|
||||
value={selectValue}
|
||||
onChange={(e) => setSelectValue(e.target.value)}
|
||||
disabled
|
||||
>
|
||||
<option value="">Choisir...</option>
|
||||
<option value="option1">Option 1</option>
|
||||
<option value="option2">Option 2</option>
|
||||
<option value="option3">Option 3</option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
{/* Badges */}
|
||||
<Card variant="dark" className="p-6 mb-8">
|
||||
<h2 className="text-2xl font-bold text-pixel-gold mb-6">Badges</h2>
|
||||
@@ -187,6 +257,9 @@ export default function StyleGuidePage() {
|
||||
<div>
|
||||
<h3 className="text-lg text-gray-300 mb-3">Tailles</h3>
|
||||
<div className="flex flex-wrap items-center gap-4">
|
||||
<Badge variant="default" size="xs">
|
||||
Extra Small
|
||||
</Badge>
|
||||
<Badge variant="default" size="sm">
|
||||
Small
|
||||
</Badge>
|
||||
|
||||
Reference in New Issue
Block a user