react-bootstrap-sweetalert icon indicating copy to clipboard operation
react-bootstrap-sweetalert copied to clipboard

Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes

Open yoyos opened this issue 2 years ago • 1 comments

Simple example:

<SweetAlert warning title={'my title'} onConfirm={() => <></>}>
        MyContent
      </SweetAlert>

Typescript exception:

S2322: Type '{ children: string; warning: true; title: string; onConfirm: () => Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<SweetAlert> & Pick<Pick<Readonly<SweetAlertProps>, keyof SweetAlertProps> & Pick<...> & Pick<...>, "title" | ... 24 more ... | "customButtons"> & InexactPartial<...> & InexactPartial<...>'.
  Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<SweetAlert> & Pick<Pick<Readonly<SweetAlertProps>, keyof SweetAlertProps> & Pick<...> & Pick<...>, "title" | ... 24 more ... | "customButtons"> & InexactPartial<...> & InexactPartial<...>'.

using:

"typescript": "^4.8.4"
"bootstrap": "^5.2.2",
"react-bootstrap": "^2.5.0",
"react": "^18.2.0",

yoyos avatar Oct 18 '22 12:10 yoyos