"use client";
import { useState } from "react";
import Tooltip from "../components/Tooltip";
import Alert from "../components/Alert";
import Button from "../components/Button";
import Stepper from "../components/Stepper";
import Progress from "../components/Progress";
import Create from "../components/Create";
import Input from "../components/Input";
import InputWithCounter from "../components/InputWithCounter";
export default function ComponentsPreview() {
const [alertVisible, setAlertVisible] = useState({
default: true,
positive: true,
warning: true,
danger: true,
banner: true,
});
const [createOpen, setCreateOpen] = useState(false);
const [createStep, setCreateStep] = useState(1);
const [policyName, setPolicyName] = useState("");
return (
{/* Tooltip Section */}
Tooltip Component
{/* Alert Section */}
Alert Component
{/* Toast Alerts */}
Toast Alerts
{alertVisible.default && (
setAlertVisible({ ...alertVisible, default: false })
}
/>
)}
{alertVisible.positive && (
setAlertVisible({ ...alertVisible, positive: false })
}
/>
)}
{alertVisible.warning && (
setAlertVisible({ ...alertVisible, warning: false })
}
/>
)}
{alertVisible.danger && (
setAlertVisible({ ...alertVisible, danger: false })
}
/>
)}
{/* Banner Alerts */}
Banner Alerts
{alertVisible.banner && (
setAlertVisible({ ...alertVisible, banner: false })
}
/>
)}
{/* Stepper Section */}
{/* Progress Section */}
{/* Create Component Section */}
Create Component
Step {createStep} of 3
setCreateOpen(false)}
title={
createStep === 1
? "What do you call your group's new policy?"
: createStep === 2
? "How should conflicts be resolved?"
: "Review your policy"
}
description="You can also combine or add new approaches to the list"
showBackButton={true}
showNextButton={true}
onBack={() => setCreateStep((prev) => Math.max(1, prev - 1))}
onNext={() => setCreateStep((prev) => Math.min(3, prev + 1))}
backButtonText="Back"
nextButtonText={createStep === 3 ? "Finish" : "Next"}
nextButtonDisabled={createStep === 1 && !policyName.trim()}
currentStep={createStep}
totalSteps={3}
>
{createStep === 1 && (
)}
{createStep === 2 && (
)}
{createStep === 3 && (
Review your policy configuration before finalizing.
Policy details will appear here
)}
);
}