Skip to content

Commit

Permalink
chore(toast): improved toastWrapper types (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraghazra authored Dec 4, 2020
1 parent 0cfb7f8 commit fccc3de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/toast.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ const ToastTriggers = () => {
};
```

[Toast Basic - Open On Sandbox](https://codesandbox.io/s/yf6i7)
[Toast Basic - Open On Sandbox](https://codesandbox.io/s/2z7hj)

[Toast Styled - Open On Sandbox](https://codesandbox.io/s/1297l)
[Toast Styled - Open On Sandbox](https://codesandbox.io/s/k9rki)

[Toast CSS Animated - Open On Sandbox](https://codesandbox.io/s/i0emy)
[Toast CSS Animated - Open On Sandbox](https://codesandbox.io/s/8vkcv)

[Toast React Spring - Open On Sandbox](https://codesandbox.io/s/2uhsj)
[Toast React Spring - Open On Sandbox](https://codesandbox.io/s/2hr08)
8 changes: 7 additions & 1 deletion src/toast/ToastProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ export type ToastTypes = Record<
>
>;

export type ToastWrapper = (props: any) => React.ReactElement<any>;
type ToastWrapper = (
props: React.PropsWithChildren<{
id: string;
placement: Placements;
isVisible?: boolean;
}>,
) => any;

type ToastProviderProps = {
/**
Expand Down

1 comment on commit fccc3de

@vercel
Copy link

@vercel vercel bot commented on fccc3de Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.