From b83e5db56370b6992ce0d556a39354a501eda633 Mon Sep 17 00:00:00 2001
From: ingawei <46611122+ingawei@users.noreply.github.com>
Date: Fri, 30 Sep 2022 00:41:22 -0500
Subject: [PATCH] getting rid of daisy buttons (#969)
* getting rid of daisy buttons so bet button does not turn black on mobile
---
web/components/answers/answer-bet-panel.tsx | 6 +--
.../answers/answer-resolve-panel.tsx | 32 +++++++------
web/components/bet-panel.tsx | 14 ++----
web/components/bets-list.tsx | 3 +-
web/components/button.tsx | 28 +++++++-----
web/components/confirmation-button.tsx | 34 +++++++++-----
web/components/groups/create-group-button.tsx | 7 +--
web/components/numeric-resolution-panel.tsx | 4 +-
web/components/resolution-panel.tsx | 32 +++++--------
.../warning-confirmation-button.tsx | 45 ++++++++-----------
web/components/yes-no-selector.tsx | 4 +-
web/pages/profile.tsx | 5 ++-
12 files changed, 107 insertions(+), 107 deletions(-)
diff --git a/web/components/answers/answer-bet-panel.tsx b/web/components/answers/answer-bet-panel.tsx
index 85f61034..9867abab 100644
--- a/web/components/answers/answer-bet-panel.tsx
+++ b/web/components/answers/answer-bet-panel.tsx
@@ -184,16 +184,14 @@ export function AnswerBetPanel(props: {
{user ? (
) : (
diff --git a/web/components/answers/answer-resolve-panel.tsx b/web/components/answers/answer-resolve-panel.tsx
index ddb7942c..57871cb8 100644
--- a/web/components/answers/answer-resolve-panel.tsx
+++ b/web/components/answers/answer-resolve-panel.tsx
@@ -85,17 +85,6 @@ export function AnswerResolvePanel(props: {
setIsSubmitting(false)
}
- const resolutionButtonClass =
- resolveOption === 'CANCEL'
- ? 'bg-yellow-400 hover:bg-yellow-500'
- : resolveOption === 'CHOOSE' && answers.length
- ? 'btn-primary'
- : resolveOption === 'CHOOSE_MULTIPLE' &&
- answers.length > 1 &&
- answers.every((answer) => chosenAnswers[answer] > 0)
- ? 'bg-blue-400 hover:bg-blue-500'
- : 'btn-disabled'
-
return (
@@ -129,11 +118,28 @@ export function AnswerResolvePanel(props: {
Clear
)}
+
1 &&
+ answers.every((answer) => chosenAnswers[answer] > 0)
+ ? 'blue'
+ : 'indigo'
+ }
+ disabled={
+ !resolveOption ||
+ (resolveOption === 'CHOOSE' && !answers.length) ||
+ (resolveOption === 'CHOOSE_MULTIPLE' &&
+ (!(answers.length > 1) ||
+ !answers.every((answer) => chosenAnswers[answer] > 0)))
+ }
onResolve={onResolve}
isSubmitting={isSubmitting}
- openModalButtonClass={resolutionButtonClass}
- submitButtonClass={resolutionButtonClass}
/>
diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx
index 5d908937..e93c0e62 100644
--- a/web/components/bet-panel.tsx
+++ b/web/components/bet-panel.tsx
@@ -395,22 +395,16 @@ export function BuyPanel(props: {
)}
)
}
return (
diff --git a/web/components/yes-no-selector.tsx b/web/components/yes-no-selector.tsx
index f73cdef2..10a58a42 100644
--- a/web/components/yes-no-selector.tsx
+++ b/web/components/yes-no-selector.tsx
@@ -213,7 +213,7 @@ export function NumberCancelSelector(props: {
return (
onSelect('NUMBER')}
className={clsx('whitespace-nowrap', btnClassName)}
>
@@ -244,7 +244,7 @@ function Button(props: {
type="button"
className={clsx(
'inline-flex flex-1 items-center justify-center rounded-md border border-transparent px-8 py-3 font-medium shadow-sm',
- color === 'green' && 'btn-primary text-white',
+ color === 'green' && 'bg-teal-500 bg-teal-600 text-white',
color === 'red' && 'bg-red-400 text-white hover:bg-red-500',
color === 'yellow' && 'bg-yellow-400 text-white hover:bg-yellow-500',
color === 'blue' && 'bg-blue-400 text-white hover:bg-blue-500',
diff --git a/web/pages/profile.tsx b/web/pages/profile.tsx
index caa9f47a..5773f30f 100644
--- a/web/pages/profile.tsx
+++ b/web/pages/profile.tsx
@@ -218,9 +218,10 @@ export default function ProfilePage(props: {
/>
,
+ icon: ,
+ color: 'indigo',
}}
submitBtn={{
label: 'Update key',