wired-elements-react icon indicating copy to clipboard operation
wired-elements-react copied to clipboard

Incorrect Typescript type

Open o-t-w opened this issue 1 year ago • 0 comments

Screenshot 2023-04-05 at 16 33 08

Copying the example in the docs, I am trying to use text as the child of a button. Typescript is complaining about 'WiredButton' components don't accept text as child elements. Text in ISX has the type 'string', but the expected type of 'children' export ( is ' (HTMLCollection & (string | number | boolean | returi ReactElement<any, string I JSXELementConstructor<any» | «di' ReactFragment I ReactPortal | null)) | undefined',

Is the Typescript typing wrong? Maybe this Stack Overflow answer provides a better option.

o-t-w avatar Apr 05 '23 15:04 o-t-w