SoftwareBrothers / adminjs-design-system

DesignSystem on which AdminJS is based on
29 stars 32 forks source link

Fixing children prop in Modal #46

Closed etomarat closed 2 years ago

etomarat commented 2 years ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

The Modal component proptypes does not accept children property, but work with that.

Here is the diff that solved my problem:

diff --git a/node_modules/@adminjs/design-system/types/molecules/modal/modal-props.d.ts b/node_modules/@adminjs/design-system/types/molecules/modal/modal-props.d.ts
index 64f73e7..7ce7d0b 100644
--- a/node_modules/@adminjs/design-system/types/molecules/modal/modal-props.d.ts
+++ b/node_modules/@adminjs/design-system/types/molecules/modal/modal-props.d.ts
@@ -31,4 +31,6 @@ export declare type ModalProps = {
      * If it is given - close button will appear.
      */
     onClose?: () => any;
+
+    children?: React.ReactNode
 };

This issue body was partially generated by patch-package.

etomarat commented 2 years ago

solution for current version of adminjs 5.10.0 and @adminjs/design-system 2.2.4: yarn add -D @types/react@^16

dziraf commented 2 years ago

this should be resolved