From 8d06e4b4d2f664971fcd45d26ccdf2fea2a265ce Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Sun, 9 Oct 2022 19:37:24 -0700 Subject: [PATCH] refactor text input into one component (#1016) * Add responsive text input component * Add styled expanding textarea component --- web/components/amount-input.tsx | 5 ++-- web/components/answers/answer-item.tsx | 5 ++-- .../answers/create-answer-panel.tsx | 6 ++--- .../answers/multiple-choice-answers.tsx | 6 ++--- .../challenges/create-challenge-modal.tsx | 6 ++--- web/components/contract-search.tsx | 7 +++--- .../contract/contract-description.tsx | 7 +++--- web/components/contract/contract-details.tsx | 9 ++++--- web/components/create-post.tsx | 8 +++--- web/components/expanding-input.tsx | 16 ++++++++++++ web/components/filter-select-users.tsx | 5 ++-- web/components/groups/create-group-button.tsx | 4 +-- web/components/groups/edit-group-button.tsx | 4 +-- web/components/input.tsx | 22 ++++++++++++++++ .../manalinks/create-links-button.tsx | 15 ++++++----- web/components/number-input.tsx | 5 ++-- web/components/probability-input.tsx | 8 +++--- web/components/probability-selector.tsx | 5 ++-- web/pages/charity/index.tsx | 5 ++-- web/pages/contract-search-firestore.tsx | 5 ++-- web/pages/create.tsx | 25 ++++++++----------- web/pages/date-docs/create.tsx | 10 +++----- web/pages/groups.tsx | 9 ++++--- web/pages/home/index.tsx | 5 ++-- web/pages/profile.tsx | 19 ++++++-------- 25 files changed, 128 insertions(+), 93 deletions(-) create mode 100644 web/components/expanding-input.tsx create mode 100644 web/components/input.tsx diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index 65a79c20..8cd43369 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -6,6 +6,7 @@ import { Col } from './layout/col' import { ENV_CONFIG } from 'common/envs/constants' import { Row } from './layout/row' import { AddFundsModal } from './add-funds-modal' +import { Input } from './input' export function AmountInput(props: { amount: number | undefined @@ -44,9 +45,9 @@ export function AmountInput(props: { {label} - {!wasResolvedTo && (showChoice === 'checkbox' ? ( -
Add your answer
-