From ed94633eea0809962552b2a7e3d1c5ab599aa212 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 29 Nov 2023 22:29:35 -0800 Subject: [PATCH 1/5] update to package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6437ffa8f..c072ea843 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "toast-component", "version": "0.1.0", "private": true, - "author": "Josh Comeau ", + "author": "Josh Comeau , Samuel Alvarez", "dependencies": { "eslint": "^8.49.0", "eslint-config-react-app": "^7.0.1", From 533faba23b773a3f2c67fdd3edb32100f10e5ca9 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 30 Nov 2023 22:44:59 -0800 Subject: [PATCH 2/5] VariantInput componented added --- .../ToastPlayground/ToastPlayground.js | 44 +++++++++---------- src/components/VariantInputs/VariantInputs.js | 22 ++++++++++ src/components/VariantInputs/index.js | 2 + 3 files changed, 46 insertions(+), 22 deletions(-) create mode 100644 src/components/VariantInputs/VariantInputs.js create mode 100644 src/components/VariantInputs/index.js diff --git a/src/components/ToastPlayground/ToastPlayground.js b/src/components/ToastPlayground/ToastPlayground.js index e1c6c6eb2..650be601d 100644 --- a/src/components/ToastPlayground/ToastPlayground.js +++ b/src/components/ToastPlayground/ToastPlayground.js @@ -4,9 +4,12 @@ import Button from '../Button'; import styles from './ToastPlayground.module.css'; +import VariantInputs from '../VariantInputs/VariantInputs'; + const VARIANT_OPTIONS = ['notice', 'warning', 'success', 'error']; function ToastPlayground() { + const [value, setValue] = React.useState(''); return (
@@ -14,7 +17,13 @@ function ToastPlayground() {

Toast Playground

-
+
{ + e.preventDefault(); + setValue(''); + }} + >