From 0272ce8d9113f3d902d84a9421dee523b5b8bb80 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 10 May 2024 11:41:16 -0700 Subject: [PATCH 01/14] Added section component, updated and renamed Button component --- .../Button/{index.css => Button.css} | 0 .../Button/{index.jsx => Button.jsx} | 34 +++++- Client/src/Components/Section/Section.jsx | 112 ++++++++++++++++++ Client/src/Pages/Demo/Demo.jsx | 15 ++- Client/src/Utils/Theme.js | 11 ++ 5 files changed, 166 insertions(+), 6 deletions(-) rename Client/src/Components/Button/{index.css => Button.css} (100%) rename Client/src/Components/Button/{index.jsx => Button.jsx} (50%) create mode 100644 Client/src/Components/Section/Section.jsx diff --git a/Client/src/Components/Button/index.css b/Client/src/Components/Button/Button.css similarity index 100% rename from Client/src/Components/Button/index.css rename to Client/src/Components/Button/Button.css diff --git a/Client/src/Components/Button/index.jsx b/Client/src/Components/Button/Button.jsx similarity index 50% rename from Client/src/Components/Button/index.jsx rename to Client/src/Components/Button/Button.jsx index 66a345746..727a3d941 100644 --- a/Client/src/Components/Button/index.jsx +++ b/Client/src/Components/Button/Button.jsx @@ -18,23 +18,47 @@ const levelConfig = { variant: "contained", color: "error", }, + imagePrimary: { + color: "primary", + variant: "text", + }, + imageSecondary: { + color: "secondary", + variant: "text", + }, + imageTertiary: { + color: "tertiary", + variant: "text", + }, }; /** * @param {Object} props - * @param {'primary' | 'secondary' | 'tertiary' | 'error'} props.level - The level of the button + * @param {'primary' | 'secondary' | 'tertiary' | 'error' | 'imagePrimary' | 'imageSecondary' | 'imageTertiary'} props.level - The level of the button * @param {string} props.label - The label of the button + * @param {React.ReactNode} props.img - Image for button * @param {boolean} [props.disabled] - Whether the button is disabled + * @param {Object} prps.sx - Styles for the button * @returns {JSX.Element} * @example * // Render an error button - *