Fix form-control styling

This commit is contained in:
Sinclair Chen 2022-10-13 13:20:04 -07:00
parent 0615bb2d4b
commit 903fcc83b3
9 changed files with 19 additions and 19 deletions

View File

@ -100,7 +100,7 @@ export function AnswerItem(props: {
</div> </div>
))} ))}
{showChoice ? ( {showChoice ? (
<div className="form-control py-1"> <div className="flex flex-col py-1">
<label className="cursor-pointer gap-3 px-1 py-2"> <label className="cursor-pointer gap-3 px-1 py-2">
<span className="">Choose this answer</span> <span className="">Choose this answer</span>
{showChoice === 'radio' && ( {showChoice === 'radio' && (

View File

@ -171,7 +171,7 @@ function CreateChallengeForm(props: {
<div>You'll bet:</div> <div>You'll bet:</div>
<Row <Row
className={ className={
'form-control w-full max-w-xs items-center justify-between gap-4 pr-3' 'w-full max-w-xs items-center justify-between gap-4 pr-3'
} }
> >
<AmountInput <AmountInput

View File

@ -55,7 +55,7 @@ export function CreatePost(props: { group?: Group }) {
<div className="rounded-lg px-6 py-4 sm:py-0"> <div className="rounded-lg px-6 py-4 sm:py-0">
<Title className="!mt-0" text="Create a post" /> <Title className="!mt-0" text="Create a post" />
<form> <form>
<div className="form-control w-full"> <div className="flex w-full flex-col">
<label className="px-1 py-2"> <label className="px-1 py-2">
<span className="mb-1"> <span className="mb-1">
Title<span className={'text-red-700'}> *</span> Title<span className={'text-red-700'}> *</span>

View File

@ -103,7 +103,7 @@ export function CreateGroupButton(props: {
</Col> </Col>
{errorText && <div className={'text-error'}>{errorText}</div>} {errorText && <div className={'text-error'}>{errorText}</div>}
<div className="form-control w-full"> <div className="flex w-full flex-col">
<label className="mb-2 ml-1 mt-0">Group name</label> <label className="mb-2 ml-1 mt-0">Group name</label>
<Input <Input
placeholder={'Your group name'} placeholder={'Your group name'}

View File

@ -51,7 +51,7 @@ export function EditGroupButton(props: { group: Group; className?: string }) {
</Button> </Button>
<Modal open={open} setOpen={updateOpen}> <Modal open={open} setOpen={updateOpen}>
<div className="h-full rounded-md bg-white p-8"> <div className="h-full rounded-md bg-white p-8">
<div className="form-control w-full"> <div className="flex w-full flex-col">
<label className="px-1 py-2"> <label className="px-1 py-2">
<span className="mb-1">Group name</span> <span className="mb-1">Group name</span>
</label> </label>
@ -66,7 +66,7 @@ export function EditGroupButton(props: { group: Group; className?: string }) {
<Spacer h={4} /> <Spacer h={4} />
<div className="form-control w-full"> <div className="flex w-full flex-col">
<label className="px-1 py-2"> <label className="px-1 py-2">
<span className="mb-0">Add members</span> <span className="mb-0">Add members</span>
</label> </label>

View File

@ -72,7 +72,7 @@ export function GroupSelector(props: {
) )
} }
return ( return (
<div className="form-control items-start"> <div className="flex flex-col items-start">
<Combobox <Combobox
as="div" as="div"
value={selectedGroup} value={selectedGroup}

View File

@ -116,7 +116,7 @@ function CreateManalinkForm(props: {
> >
<Title className="!my-0" text="Create a Manalink" /> <Title className="!my-0" text="Create a Manalink" />
<div className="flex flex-col flex-wrap gap-x-5 gap-y-2"> <div className="flex flex-col flex-wrap gap-x-5 gap-y-2">
<div className="form-control flex-auto"> <div className="flex flex-auto flex-col">
<label className="px-1 py-2">Amount</label> <label className="px-1 py-2">Amount</label>
<div className="relative"> <div className="relative">
<span className="absolute mx-3 mt-3.5 text-sm text-gray-400"> <span className="absolute mx-3 mt-3.5 text-sm text-gray-400">
@ -136,7 +136,7 @@ function CreateManalinkForm(props: {
</div> </div>
</div> </div>
<div className="flex flex-col gap-2 md:flex-row"> <div className="flex flex-col gap-2 md:flex-row">
<div className="form-control w-full md:w-1/2"> <div className="flex w-full flex-col md:w-1/2">
<label className="px-1 py-2">Uses</label> <label className="px-1 py-2">Uses</label>
<Input <Input
type="number" type="number"
@ -149,7 +149,7 @@ function CreateManalinkForm(props: {
} }
/> />
</div> </div>
<div className="form-control w-full md:w-1/2"> <div className="flex w-full flex-col md:w-1/2">
<label className="px-1 py-2">Expires in</label> <label className="px-1 py-2">Expires in</label>
<Select <Select
value={expiresIn} value={expiresIn}
@ -163,7 +163,7 @@ function CreateManalinkForm(props: {
</Select> </Select>
</div> </div>
</div> </div>
<div className="form-control w-full"> <div className="flex w-full flex-col">
<label className="px-1 py-2">Message</label> <label className="px-1 py-2">Message</label>
<ExpandingInput <ExpandingInput
placeholder={defaultMessage} placeholder={defaultMessage}

View File

@ -96,7 +96,7 @@ export default function Create(props: { auth: { user: User } }) {
<Title className="!mt-0" text="Create a market" /> <Title className="!mt-0" text="Create a market" />
<form> <form>
<div className="form-control w-full"> <div className="flex w-full flex-col">
<label className="px-1 pt-2 pb-3"> <label className="px-1 pt-2 pb-3">
Question<span className={'text-red-700'}>*</span> Question<span className={'text-red-700'}>*</span>
</label> </label>
@ -314,7 +314,7 @@ export function NewContract(props: {
{outcomeType === 'PSEUDO_NUMERIC' && ( {outcomeType === 'PSEUDO_NUMERIC' && (
<> <>
<div className="form-control mb-2 items-start"> <div className="mb-2 flex flex-col items-start">
<label className="gap-2 px-1 py-2"> <label className="gap-2 px-1 py-2">
<span className="mb-1">Range</span> <span className="mb-1">Range</span>
<InfoTooltip text="The lower and higher bounds of the numeric range. Choose bounds the value could reasonably be expected to hit." /> <InfoTooltip text="The lower and higher bounds of the numeric range. Choose bounds the value could reasonably be expected to hit." />
@ -359,7 +359,7 @@ export function NewContract(props: {
</div> </div>
)} )}
</div> </div>
<div className="form-control mb-2 items-start"> <div className="mb-2 flex flex-col items-start">
<label className="gap-2 px-1 py-2"> <label className="gap-2 px-1 py-2">
<span className="mb-1">Initial value</span> <span className="mb-1">Initial value</span>
<InfoTooltip text="The starting value for this market. Should be in between min and max values." /> <InfoTooltip text="The starting value for this market. Should be in between min and max values." />
@ -406,7 +406,7 @@ export function NewContract(props: {
)} )}
</Row> </Row>
<Row className="form-control my-2 items-center gap-2 text-sm"> <Row className="my-2 items-center gap-2 text-sm">
<span>Display this market on homepage</span> <span>Display this market on homepage</span>
<ShortToggle <ShortToggle
on={visibility === 'public'} on={visibility === 'public'}
@ -416,7 +416,7 @@ export function NewContract(props: {
<Spacer h={6} /> <Spacer h={6} />
<div className="form-control mb-1 items-start"> <div className="mb-1 flex flex-col items-start">
<label className="mb-1 gap-2 px-1 py-2"> <label className="mb-1 gap-2 px-1 py-2">
<span>Question closes in</span> <span>Question closes in</span>
<InfoTooltip text="Predicting will be halted after this time (local timezone)." /> <InfoTooltip text="Predicting will be halted after this time (local timezone)." />
@ -459,7 +459,7 @@ export function NewContract(props: {
<Spacer h={6} /> <Spacer h={6} />
<div className="form-control mb-1 items-start gap-1"> <div className="mb-1 flex flex-col items-start gap-1">
<label className="gap-2 px-1 py-2"> <label className="gap-2 px-1 py-2">
<span className="mb-1">Description</span> <span className="mb-1">Description</span>
<InfoTooltip text="Optional. Describe how you will resolve this question." /> <InfoTooltip text="Optional. Describe how you will resolve this question." />
@ -470,7 +470,7 @@ export function NewContract(props: {
<Spacer h={6} /> <Spacer h={6} />
<span className={'text-error'}>{errorText}</span> <span className={'text-error'}>{errorText}</span>
<Row className="items-end justify-between"> <Row className="items-end justify-between">
<div className="form-control mb-1 items-start"> <div className="mb-1 flex flex-col items-start">
<label className="mb-1 gap-2 px-1 py-2"> <label className="mb-1 gap-2 px-1 py-2">
<span>Cost</span> <span>Cost</span>
<InfoTooltip <InfoTooltip

View File

@ -117,7 +117,7 @@ export default function PostPage(props: {
<Spacer h={2} /> <Spacer h={2} />
<div className="rounded-lg bg-white px-6 py-4 sm:py-0"> <div className="rounded-lg bg-white px-6 py-4 sm:py-0">
<div className="form-control w-full py-2"> <div className="flex w-full flex-col py-2">
{user && user.id === post.creatorId ? ( {user && user.id === post.creatorId ? (
<RichEditPost post={post} /> <RichEditPost post={post} />
) : ( ) : (