Open yerlantemir opened 3 years ago
I came up on creating my custom useAlert hook with showAlert method which similarly takes message and type as arguments. And if type === Warning
, I add '_' to my message and call alert.show method from library
And in my AlertTemplate I do this:
Where:
I know that it's kinda weird solution, but it works ! :)
How to repeat example from #121 with typescript ? I am facing error:
TS2345: Argument of type '{ CUSTOM_TYPE: string; }' is not assignable to parameter of type 'AlertCustomOptionsWithType'.