Toasts prop on the Toast provider component #9
Labels
enhancement
New feature or request
hacktoberfest
on hold
Toast behavior
Related with the implementation of toast behavior
V0.1 release
Will be included in V0.1 release
Description
In order to increase the scalability and the dev experience using the library, we need to add a prop calling
toasts
to theToastProvider
component, this prop allows our users to implement in the provider an easy way of calling different types of Toast components, only calling by their key name assigned in thetoasts
object which has as a value the custom component.Expected Behavior
As an example of the expected behavior, we have
toastsComponents
objects declared in this wayThe
ToastsProvider
receive the prop according to thisAnd when the hook
useToast
receive on of the keys declared ontoastsComponents
, then acts the same way it would if you were passing a component paramThe text was updated successfully, but these errors were encountered: