Closed limonte closed 4 years ago
Should we deprecate shorthands or somehow support passing Element shorthands? What do you think about this @zenflow
I don't think we should ever downgrade the actual capabilities of a library in order to match typings. It should be the other way around; the typings should be made to match the actual types of the library.
Done, thank you @zenflow for the feedback!
sweetalert2-react-content
is used in sweetalert2-webpack-demo
now: https://github.com/sweetalert2/sweetalert2-webpack-demo/commit/962f5f6e18948d85883a0b7ba5d83c267aa39f37 :tada:
Reopening this issue as https://github.com/sweetalert2/sweetalert2/pull/1804 brought the regression described in https://github.com/sweetalert2/sweetalert2/issues/1822
This issue should be fixed here.
Can't reproduce this issue anymore, shorthands seem to work as expected:
When using with TypeScript
produces this error:
Which is correct per sweetalert2's types:
The first param
title
isstring
and passing<p>Shorthand works too</p>
should produce an error.Should we deprecate shorthands or somehow support passing
Element
shorthands? What do you think about this @zenflow