From d40920c43a95a63a25e07d56bd4e396cb0eff20d Mon Sep 17 00:00:00 2001 From: Veysel <66980512+veyselboybay@users.noreply.github.com> Date: Tue, 7 May 2024 14:40:33 -0400 Subject: [PATCH] =?UTF-8?q?Revert=20"Added=20start=20and=20end=20icon=20pr?= =?UTF-8?q?ops=20to=20buttons=20to=20allow=20for=20images,=20made=20p?= =?UTF-8?q?=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/src/Components/Button/index.jsx | 19 +++----------- Client/src/Pages/Home/index.jsx | 36 +++----------------------- 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/Client/src/Components/Button/index.jsx b/Client/src/Components/Button/index.jsx index 034a1823f..f357e1dd2 100644 --- a/Client/src/Components/Button/index.jsx +++ b/Client/src/Components/Button/index.jsx @@ -24,35 +24,22 @@ const levelConfig = { * @typedef {Object} Props * @property {'primary' | 'secondary' | 'tertiary' | 'error'} level - The level of the button * @property {string} label - The label of the button - * @property {React.ReactNode} [startIcon] - Icon prepended to the label - * @property {React.ReactNode} [endIcon] - Icon appended to the button label * @property {boolean} [disabled] - Whether the button is disabled - * @property {(event: React.MouseEvent) => void} [onClick] - The click handler of the button */ -const Button = ({ level, label, disabled, startIcon, endIcon, onClick }) => { +const Button = ({ level, label, disabled }) => { const { variant, color } = levelConfig[level]; return ( - + {label} ); }; Button.propTypes = { - level: PropTypes.oneOf(["primary", "secondary", "tertiary", "error"]), + level: PropTypes.string.isRequired, label: PropTypes.string.isRequired, - startIcon: PropTypes.node, - endIcon: PropTypes.node, disabled: PropTypes.bool, - onClick: PropTypes.func, }; export default Button; diff --git a/Client/src/Pages/Home/index.jsx b/Client/src/Pages/Home/index.jsx index d0e2eebbc..849489ff8 100644 --- a/Client/src/Pages/Home/index.jsx +++ b/Client/src/Pages/Home/index.jsx @@ -2,7 +2,6 @@ import React from "react"; import DropdownTeamMember from "../../Components/DropdownTeamMember"; import "./index.css"; import Button from "../../Components/Button"; -import SettingsIcon from "@mui/icons-material/Settings"; const Home = () => { return ( @@ -14,24 +13,10 @@ const Home = () => { >

Buttons

-

Disabled Buttons

@@ -40,19 +25,6 @@ const Home = () => {
-

Image Button

-
-
);