@campxdev/shared 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -36,6 +36,7 @@ interface DrawerButtonProps {
36
36
  btnTxt?: string | ReactNode
37
37
  btnProps?: ButtonProps
38
38
  dialogProps?: Omit<DialogProps, 'open'>
39
+ onDialogClose?: () => void
39
40
  }
40
41
 
41
42
  export default function DialogButton({
@@ -45,6 +46,7 @@ export default function DialogButton({
45
46
  btnTxt,
46
47
  btnProps,
47
48
  dialogProps,
49
+ onDialogClose,
48
50
  }: DrawerButtonProps) {
49
51
  const [open, setOpen] = useState(false)
50
52
 
@@ -59,6 +61,7 @@ export default function DialogButton({
59
61
  })
60
62
 
61
63
  const onClose = () => {
64
+ onDialogClose && onDialogClose()
62
65
  setOpen(false)
63
66
  }
64
67
  return (