From 0801f6a94a5aec6aadc79353ca5b4dfe9c76e0e6 Mon Sep 17 00:00:00 2001 From: ingawei Date: Thu, 29 Sep 2022 20:08:42 -0700 Subject: [PATCH] getting rid of daisy buttons --- web/components/answers/answer-bet-panel.tsx | 5 +-- web/components/bet-panel.tsx | 12 ++---- web/components/button.tsx | 28 +++++++------ web/components/confirmation-button.tsx | 14 +++++-- .../warning-confirmation-button.tsx | 39 ++++++++----------- 5 files changed, 48 insertions(+), 50 deletions(-) diff --git a/web/components/answers/answer-bet-panel.tsx b/web/components/answers/answer-bet-panel.tsx index 85f61034..4842f4b2 100644 --- a/web/components/answers/answer-bet-panel.tsx +++ b/web/components/answers/answer-bet-panel.tsx @@ -184,16 +184,13 @@ export function AnswerBetPanel(props: { {user ? ( ) : ( diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 5d908937..5249e889 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -399,18 +399,12 @@ export function BuyPanel(props: { warning={warning} onSubmit={submitBet} isSubmitting={isSubmitting} - openModalButtonClass={clsx( - 'btn mb-2 flex-1', - betDisabled || outcome === undefined - ? 'btn-disabled bg-greyscale-2' - : outcome === 'NO' - ? 'border-none bg-red-400 hover:bg-red-500' - : 'border-none bg-teal-500 hover:bg-teal-600' - )} + disabled={!!betDisabled || outcome === undefined} + size="xl" /> )} ) } diff --git a/web/components/warning-confirmation-button.tsx b/web/components/warning-confirmation-button.tsx index 7c546c3b..69a6f5e6 100644 --- a/web/components/warning-confirmation-button.tsx +++ b/web/components/warning-confirmation-button.tsx @@ -5,6 +5,7 @@ import { Row } from './layout/row' import { ConfirmationButton } from './confirmation-button' import { ExclamationIcon } from '@heroicons/react/solid' import { formatMoney } from 'common/util/format' +import { Button, SizeType } from './button' export function WarningConfirmationButton(props: { amount: number | undefined @@ -12,10 +13,11 @@ export function WarningConfirmationButton(props: { marketType: 'freeResponse' | 'binary' warning?: string onSubmit: () => void - disabled?: boolean + disabled: boolean isSubmitting: boolean openModalButtonClass?: string submitButtonClassName?: string + size: SizeType }) { const { amount, @@ -26,53 +28,44 @@ export function WarningConfirmationButton(props: { openModalButtonClass, submitButtonClassName, outcome, - marketType, + size, } = props + if (!warning) { return ( - + ) } return (