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' ? ( - - updateQuery(e.target.value)} onBlur={trackCallback('search', { query: query })} - placeholder={'Search'} - className="input input-bordered w-full" + placeholder="Search" + className="w-full" autoFocus={autoFocus} /> {!isMobile && !query && ( diff --git a/web/components/contract/contract-details.tsx b/web/components/contract/contract-details.tsx index 3b308667..d2734ab5 100644 --- a/web/components/contract/contract-details.tsx +++ b/web/components/contract/contract-details.tsx @@ -40,6 +40,7 @@ import { BountiedContractBadge, BountiedContractSmallBadge, } from 'web/components/contract/bountied-contract-badge' +import { Input } from '../input' export type ShowTime = 'resolve-date' | 'close-date' @@ -445,17 +446,17 @@ function EditableCloseDate(props: { - e.stopPropagation()} onChange={(e) => setCloseDate(e.target.value)} min={Date.now()} value={closeDate} /> - e.stopPropagation()} onChange={(e) => setCloseHoursMinutes(e.target.value)} min="00:00" diff --git a/web/components/filter-select-users.tsx b/web/components/filter-select-users.tsx index 415a6d57..8ec453d2 100644 --- a/web/components/filter-select-users.tsx +++ b/web/components/filter-select-users.tsx @@ -8,6 +8,7 @@ import { Avatar } from 'web/components/avatar' import { Row } from 'web/components/layout/row' import { searchInAny } from 'common/util/parse' import { UserLink } from 'web/components/user-link' +import { Input } from './input' export function FilterSelectUsers(props: { setSelectedUsers: (users: User[]) => void @@ -50,13 +51,13 @@ export function FilterSelectUsers(props: {
- setQuery(e.target.value)} - className="input input-bordered block w-full pl-10 focus:border-gray-300 " + className="block w-full pl-10" placeholder="Austin Chen" /> diff --git a/web/components/groups/create-group-button.tsx b/web/components/groups/create-group-button.tsx index 1df29764..017fa4a6 100644 --- a/web/components/groups/create-group-button.tsx +++ b/web/components/groups/create-group-button.tsx @@ -8,6 +8,7 @@ import { Title } from '../title' import { User } from 'common/user' import { MAX_GROUP_NAME_LENGTH } from 'common/group' import { createGroup } from 'web/lib/firebase/api' +import { Input } from '../input' export function CreateGroupButton(props: { user: User @@ -104,9 +105,8 @@ export function CreateGroupButton(props: {
- Group name - setName(e.target.value || '')} diff --git a/web/components/input.tsx b/web/components/input.tsx new file mode 100644 index 00000000..f37bfc78 --- /dev/null +++ b/web/components/input.tsx @@ -0,0 +1,22 @@ +import clsx from 'clsx' +import React from 'react' + +/** Text input. Wraps html `` */ +export const Input = (props: JSX.IntrinsicElements['input']) => { + const { className, ...rest } = props + + return ( + + ) +} + +/* + TODO: replace daisyui style with our own. For reference: + + james: text-lg placeholder:text-gray-400 + inga: placeholder:text-greyscale-4 border-greyscale-2 rounded-md + austin: border-gray-300 text-gray-400 focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm + */ diff --git a/web/components/manalinks/create-links-button.tsx b/web/components/manalinks/create-links-button.tsx index 449d6c76..b2fc1f11 100644 --- a/web/components/manalinks/create-links-button.tsx +++ b/web/components/manalinks/create-links-button.tsx @@ -13,6 +13,7 @@ import { Button } from '../button' import { getManalinkUrl } from 'web/pages/links' import { DuplicateIcon } from '@heroicons/react/outline' import { QRCode } from '../qr-code' +import { Input } from '../input' export function CreateLinksButton(props: { user: User @@ -120,8 +121,8 @@ function CreateManalinkForm(props: { M$ -
- + />
diff --git a/web/components/number-input.tsx b/web/components/number-input.tsx index 0b48df6e..6509a5d7 100644 --- a/web/components/number-input.tsx +++ b/web/components/number-input.tsx @@ -4,6 +4,7 @@ import { ReactNode } from 'react' import React from 'react' import { Col } from './layout/col' import { Spacer } from './layout/spacer' +import { Input } from './input' export function NumberInput(props: { numberString: string @@ -32,9 +33,9 @@ export function NumberInput(props: { return (