From 4b897ad9e7504da8b73a7971c7542bf43a269789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1rio=20Guimar=C3=A3es?= <49988070+Darguima@users.noreply.github.com> Date: Wed, 6 Dec 2023 23:30:57 +0000 Subject: [PATCH] fix: standardize button component implementation (#585) --- components/Button/index.tsx | 17 ++++------------- components/Layout/Layout.tsx | 2 +- layout/Attendee/Profile/Profile.tsx | 4 ++-- layout/Attendee/Wheel/Wheel.tsx | 4 ++-- .../components/Challenges/Challenge/index.tsx | 2 +- layout/Home/components/Hero/Pitch/index.jsx | 4 ++-- layout/Home/components/Speakers/index.jsx | 2 +- layout/Login/components/LoginForm/index.tsx | 2 +- layout/Product/Product.tsx | 2 +- .../components/ResetPasswordForm/index.tsx | 2 +- layout/SignUp/components/SignUpForm/index.tsx | 4 ++-- .../components/StaffRedeemButton/index.jsx | 5 +---- .../dashboard/SponsorBadgeButton/index.jsx | 5 +---- .../dashboard/SponsorPrizeButton/index.jsx | 2 +- .../sponsor/spotlight/SpotlightButton/index.jsx | 5 +---- layout/shared/Leaderboard/Leaderboard.tsx | 4 ++-- pages/register/[uuid].js | 6 +++--- 17 files changed, 27 insertions(+), 45 deletions(-) diff --git a/components/Button/index.tsx b/components/Button/index.tsx index d2ff5b36..dc0deab6 100644 --- a/components/Button/index.tsx +++ b/components/Button/index.tsx @@ -3,9 +3,7 @@ import { ButtonHTMLAttributes, ReactNode } from "react"; interface Props extends Omit, "title"> { title: ReactNode; description?: string; - customStyle?: string; bold?: boolean; - disabled?: boolean; } interface ButtonTitleProps { @@ -16,22 +14,15 @@ interface ButtonTitleProps { export default function Button({ title, description, - type, - disabled, - onClick, - customStyle, - bold, + bold = false, ...rest }: Props) { return ( diff --git a/layout/Attendee/Profile/Profile.tsx b/layout/Attendee/Profile/Profile.tsx index ff26cc7e..4f3c9494 100644 --- a/layout/Attendee/Profile/Profile.tsx +++ b/layout/Attendee/Profile/Profile.tsx @@ -102,10 +102,10 @@ function Profile({ courses }) {
diff --git a/layout/Attendee/Wheel/Wheel.tsx b/layout/Attendee/Wheel/Wheel.tsx index aeacf190..6cbf0c1a 100644 --- a/layout/Attendee/Wheel/Wheel.tsx +++ b/layout/Attendee/Wheel/Wheel.tsx @@ -203,11 +203,11 @@ function WheelPage() {