react-confirm-alert 3.0.1 → 3.0.4

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.
Files changed (2) hide show
  1. package/index.d.ts +5 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
+ import React, { ButtonHTMLAttributes } from 'react';
2
+
1
3
  declare module 'react-confirm-alert' {
2
4
  export interface ReactConfirmAlertProps {
3
- targetId: string
5
+ targetId?: string
4
6
  title?: string
5
7
  message?: string
6
8
  buttons?: Array<{
7
9
  label: string
8
10
  className?: string
9
- } & HTMLButtonElement>
11
+ } & ButtonHTMLAttributes<HTMLButtonElement>>
10
12
  childrenElement?: () => React.ReactNode
11
13
  customUI?: (customUiOptions: {
12
14
  title: string
@@ -15,7 +17,7 @@ declare module 'react-confirm-alert' {
15
17
  }) => React.ReactNode
16
18
  closeOnClickOutside?: boolean
17
19
  closeOnEscape?: boolean
18
- keyCodeForClose: Array<number>
20
+ keyCodeForClose?: Array<number>
19
21
  willUnmount?: () => void
20
22
  onClickOutside?: () => void
21
23
  onKeypressEscape?: () => void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-confirm-alert",
3
- "version": "3.0.1",
3
+ "version": "3.0.4",
4
4
  "description": "react component confirm dialog.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {