diff --git a/src/components/App/App.js b/src/components/App/App.js
index 785b62a6..b4b1135d 100644
--- a/src/components/App/App.js
+++ b/src/components/App/App.js
@@ -1,14 +1,14 @@
-import React from 'react';
-
-import ToastPlayground from '../ToastPlayground';
-import Footer from '../Footer';
+import React from "react";
+import ToastPlayground from "../ToastPlayground";
+import Footer from "../Footer";
+import ToastProvider from "../ToastProvider";
function App() {
return (
- <>
+
- >
+
);
}
diff --git a/src/components/Toast/Toast.js b/src/components/Toast/Toast.js
index 96af6012..de145ca1 100644
--- a/src/components/Toast/Toast.js
+++ b/src/components/Toast/Toast.js
@@ -1,15 +1,15 @@
-import React from 'react';
+import React from "react";
import {
AlertOctagon,
AlertTriangle,
CheckCircle,
Info,
X,
-} from 'react-feather';
+} from "react-feather";
-import VisuallyHidden from '../VisuallyHidden';
-
-import styles from './Toast.module.css';
+import VisuallyHidden from "../VisuallyHidden";
+import { ToastContext } from "../ToastProvider";
+import styles from "./Toast.module.css";
const ICONS_BY_VARIANT = {
notice: Info,
@@ -18,16 +18,17 @@ const ICONS_BY_VARIANT = {
error: AlertOctagon,
};
-function Toast() {
+function Toast({ id, variant, content }) {
+ const IconTag = ICONS_BY_VARIANT[variant];
+ const { handleDismiss } = React.useContext(ToastContext);
+
return (
-
+
-
+
-
- 16 photos have been uploaded
-
-