From e333a8fdc88ac553a4cc69e0cb7f08288c15569a Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 6 May 2024 12:34:36 -0700 Subject: [PATCH] Changed value prop name to label for button label. Added sample buttons to home page --- Client/src/Components/Button/index.jsx | 6 +++--- Client/src/Pages/Home/index.jsx | 12 +++++++++++- Client/src/index.css | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Client/src/Components/Button/index.jsx b/Client/src/Components/Button/index.jsx index b9a4d7e14..f357e1dd2 100644 --- a/Client/src/Components/Button/index.jsx +++ b/Client/src/Components/Button/index.jsx @@ -27,18 +27,18 @@ const levelConfig = { * @property {boolean} [disabled] - Whether the button is disabled */ -const Button = ({ level, value, disabled }) => { +const Button = ({ level, label, disabled }) => { const { variant, color } = levelConfig[level]; return ( - {value} + {label} ); }; Button.propTypes = { level: PropTypes.string.isRequired, - value: PropTypes.string.isRequired, + label: PropTypes.string.isRequired, disabled: PropTypes.bool, }; diff --git a/Client/src/Pages/Home/index.jsx b/Client/src/Pages/Home/index.jsx index d6874d5ea..849489ff8 100644 --- a/Client/src/Pages/Home/index.jsx +++ b/Client/src/Pages/Home/index.jsx @@ -8,13 +8,23 @@ const Home = () => { <>
Home
-
+
+

Buttons

+

Disabled Buttons

+
+
); diff --git a/Client/src/index.css b/Client/src/index.css index d761fd0ba..18aa9a223 100644 --- a/Client/src/index.css +++ b/Client/src/index.css @@ -70,4 +70,4 @@ button:focus-visible { button { background-color: #f9f9f9; } -} \ No newline at end of file +}