79506977

Date: 2025-03-13 15:58:30
Score: 1.5
Natty:
Report link

You only need to wrap your action button as below, following the documentation from https://ui.shadcn.com/docs/components/dialog#custom-close-button

<DialogFooter>
  <DialogClose asChild>
    <Button onClick={() => { console.log("something") }} type="button">
      Do something and close
    </Button>
  </DialogClose>
</DialogFooter>
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: henriquebf