"use client"; import React from "react"; import { Button } from "@/subframe/components/Button"; import { Dialog } from "@/subframe/components/Dialog"; function DialogExample() { return ( <Dialog open={false} onOpenChange={(open: boolean) => {}}> <Dialog.Content> <div className="flex w-96 flex-col items-start gap-6 px-6 py-6"> <div className="flex flex-col items-start gap-1"> <span className="text-heading-3 font-heading-3 text-default-font"> Delete your account? </span> <span className="text-body font-body text-default-font"> This action cannot be undone. This will permanently remove all data from our servers. </span> </div> <div className="flex w-full grow shrink-0 basis-0 flex-col items-end justify-center gap-2"> <div className="flex items-start gap-2"> <Button variant="neutral-tertiary" icon={null} onClick={(event: React.MouseEvent<HTMLButtonElement>) => {}} > Cancel </Button> <Button variant="destructive-primary" icon="FeatherTrash2" onClick={(event: React.MouseEvent<HTMLButtonElement>) => {}} > Delete </Button> </div> </div> </div> </Dialog.Content> </Dialog> ); } export default DialogExample;
children
React.ReactNode
open
boolean
onOpenChange
(open: boolean) => void
Use open and onOpenChange props to control the open state.
View code