You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there building a dialog looks something like this.
import{Dialog,DialogContent,DialogHeader,DialogTitle}from"components/molecules/Dialog/dialog";constDeleteAccountModal=({ open, setOpen, onDelete }: DeleteAccountModalProps)=>{return(<Dialogopen={open}onOpenChange={setOpen}><DialogContentclassName="p-4"><DialogHeader><DialogTitleclassName="text-left">Delete Account</DialogTitle></DialogHeader><divclassName="flex flex-col gap-4"><Text>Are you sure you want to delete your account?</Text><divclassName="flex gap-4"><Buttontype="submit"rel="noopener noreferrer"target="_blank"className="w-max border-dark-red-8 bg-dark-red-8 text-white hover:border-dark-red-7 hover:bg-dark-red-7"variant="primary"onClick={onDelete}>
Delete
</Button><Buttonvariant="default"onClick={()=>{setOpen(false);}}>
Cancel
</Button></div></div></DialogContent></Dialog>);};
This works, but there is a lot of boiler plate and it opens up the door to deviate from standard styles as well, specifically for the title.
Suggested solution
import{Dialog}from"components/molecules/Dialog/dialog";constDeleteAccountModal=({ open, setOpen, onDelete }: DeleteAccountModalProps)=>{return(<Dialogtitle="Delete Account"open={open}onOpenChange={setOpen}><divclassName="flex flex-col gap-4"><Text>Are you sure you want to delete your account?</Text><divclassName="flex gap-4"><Buttontype="submit"rel="noopener noreferrer"target="_blank"className="w-max border-dark-red-8 bg-dark-red-8 text-white hover:border-dark-red-7 hover:bg-dark-red-7"variant="primary"onClick={onDelete}>
Delete
</Button><Buttonvariant="default"onClick={()=>{setOpen(false);}}>
Cancel
</Button></div></div></Dialog>);};
This could be the base for a dialog then we could update the confirm or alert dialogs that have specific buttons that the dev can't change aside from text and button events.
Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.
To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please reach out to us on Discord or follow up on the issue itself.
For full info on how to contribute, please check out our contributors guide.
Type of feature
π§βπ» Refactor
Current behavior
Currently there building a dialog looks something like this.
This works, but there is a lot of boiler plate and it opens up the door to deviate from standard styles as well, specifically for the title.
Suggested solution
This could be the base for a dialog then we could update the confirm or alert dialogs that have specific buttons that the dev can't change aside from text and button events.
Relates to the efforts in https://github.com/open-sauced/internal-team/issues/21
Additional context
No response
Code of Conduct
Contributing Docs
The text was updated successfully, but these errors were encountered: