/
githubmirror
/
screenshot-to-code
Обзор
Документация
Войти
/
githubmirror
/
screenshot-to-code
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
frontend/src/components/settings/DesignSystemsModal.tsx
64 строки
2 KB
Abi Raja
Add persistent design systems for prompts
15 май 2026, 20:34
15 май 2026, 20:34
bdb91eb
Код
Авторство
О чём код?
import { DesignSystem } from "../../types"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "../ui/dialog"; import DesignSystemsManager from "./DesignSystemsManager"; interface Props { open: boolean; onOpenChange: (open: boolean) => void; designSystems: DesignSystem[]; selectedDesignSystemId: string | null; setSelectedDesignSystemId: (id: string | null) => void; initialEditingId: string | null; createDesignSystem: (payload: { name: string; content: string; }) => Promise<DesignSystem>; updateDesignSystem: ( id: string, payload: { name?: string; content?: string } ) => Promise<DesignSystem>; deleteDesignSystem: (id: string) => Promise<void>; } function DesignSystemsModal({ open, onOpenChange, designSystems, selectedDesignSystemId, setSelectedDesignSystemId, initialEditingId, createDesignSystem, updateDesignSystem, deleteDesignSystem, }: Props) { return ( <Dialog open={open} onOpenChange={onOpenChange}> <DialogContent className="max-w-2xl"> <DialogHeader> <DialogTitle>Design Systems</DialogTitle> <DialogDescription> Define color, typography, and layout rules applied to every generation. </DialogDescription> </DialogHeader> <DesignSystemsManager designSystems={designSystems} selectedDesignSystemId={selectedDesignSystemId} setSelectedDesignSystemId={setSelectedDesignSystemId} initialEditingId={initialEditingId} createDesignSystem={createDesignSystem} updateDesignSystem={updateDesignSystem} deleteDesignSystem={deleteDesignSystem} /> </DialogContent> </Dialog> ); } export default DesignSystemsModal;