Skip to content

Commit

Permalink
✨(react) add ToastProvider to CunninghamProvider
Browse files Browse the repository at this point in the history
This allows the consumer to use useToastProvider very easily, it avoids
thinking of explicity adding ToastProvider to apps that needs toasts.
  • Loading branch information
NathanVss committed Jan 5, 2024
1 parent 692b4a8 commit 1787df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react/src/components/Provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import * as enUS from ":/locales/en-US.json";
import * as frFR from ":/locales/fr-FR.json";
import { PartialNested } from ":/types";
import { Locales } from ":/components/Provider/Locales";
import { ToastProvider } from ":/components/Toast/ToastProvider";

type TranslationSet = PartialNested<typeof enUS>;

Expand Down Expand Up @@ -100,7 +101,7 @@ export const CunninghamProvider = ({

return (
<CunninghamContext.Provider value={context}>
{children}
<ToastProvider>{children}</ToastProvider>
</CunninghamContext.Provider>
);
};

0 comments on commit 1787df0

Please sign in to comment.