From 7eda3db311dc4e1e8f17872bf1a9d6d46372e1f2 Mon Sep 17 00:00:00 2001 From: Scarlett Date: Mon, 7 Oct 2024 18:40:23 -0400 Subject: [PATCH 1/7] ex-1-add control to text area; render four radio buttons and control them using state; --- package-lock.json | 12 +++---- .../ToastPlayground/ToastPlayground.js | 35 ++++++++++++------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 20c9a8b2b..c155807cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4832,9 +4832,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001523", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz", - "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==", + "version": "1.0.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", "funding": [ { "type": "opencollective", @@ -12013,9 +12013,9 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "caniuse-lite": { - "version": "1.0.30001523", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz", - "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==" + "version": "1.0.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==" }, "chalk": { "version": "4.1.2", diff --git a/src/components/ToastPlayground/ToastPlayground.js b/src/components/ToastPlayground/ToastPlayground.js index e1c6c6eb2..47f40f353 100644 --- a/src/components/ToastPlayground/ToastPlayground.js +++ b/src/components/ToastPlayground/ToastPlayground.js @@ -7,6 +7,11 @@ import styles from './ToastPlayground.module.css'; const VARIANT_OPTIONS = ['notice', 'warning', 'success', 'error']; function ToastPlayground() { + const [message, setMessage] = React.useState("") + const [optionValue, setOptionValue] = React.useState('notice') + + + return (
@@ -24,7 +29,9 @@ function ToastPlayground() { Message
-