twigs
twigs copied to clipboard
Ability to pass `position` to `toast`
Is your feature request related to a problem? Please describe.
Currently toast
position is handled at Toast
component. This prevents us having toast at different positions based on the toast context. For example, certain toast I would want in left bottom and some others on the bottom-center.
Describe the solution you'd like
- Keep a default position in the
Toast
component. - while using
toast
hook, accept aposition
prop.
<Button
onClick={() => {
toast({
title: "Toast title",
position: 'top-right',
});
}}
>
Show Toast
</Button>