Skip to content

Commit

Permalink
✨ - feat: confirm works for forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaohs authored and svenvandescheur committed Oct 10, 2024
1 parent d780608 commit 1bd5291
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/dialog/usealert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const useAlert = () => {
{
children: labelConfirm,
variant: "primary",
type: "submit",
onClick: () => {
setModalProps({ open: false });
onConfirm?.();
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/dialog/useconfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const useConfirm = () => {
{
children: labelCancel,
variant: "secondary",
type: "button",
onClick: () => {
setModalProps({ open: false });
onCancel?.();
Expand All @@ -47,6 +48,7 @@ export const useConfirm = () => {
{
children: labelConfirm,
variant: "primary",
type: "submit",
onClick: () => {
setModalProps({ open: false });
onConfirm?.();
Expand Down

0 comments on commit 1bd5291

Please sign in to comment.