teqo-backup/src/components/campaign/shared/CampaignSearchInput.tsx
Francisco Ignácio Fontoura Solla c706c62098 Pass 2 W2: components/campaign em subpastas por dominio
106 arquivos flat -> 15 dominios (actionPlan, advisor, auth, dashboard, demand, invite, leadership, map, municipality, organization, stateDeputy, supporter, votePledge, shared, shell) via git mv; imports absolutos reescritos em 98 arquivos; excecao de lint do campaign-logo e paths dos specs de contrato (campaignInviteUi, campaignComponents) atualizados. Sem mudanca de conteudo nos componentes.
2026-07-25 14:52:17 -03:00

42 lines
1 KiB
TypeScript

import type { ComponentProps } from 'react'
import { SearchIcon } from 'lucide-react'
import { Field, FieldLabel } from '@/components/ui/field'
import {
InputGroup,
InputGroupAddon,
InputGroupInput,
} from '@/components/ui/input-group'
import { cn } from '@/lib/utils'
type CampaignSearchInputProps = Omit<ComponentProps<typeof InputGroupInput>, 'id'> & {
id: string
label: string
fieldClassName?: string
}
export const CampaignSearchInput = ({
id,
label,
fieldClassName,
className,
type = 'search',
...props
}: CampaignSearchInputProps) => (
<Field className={cn('relative flex-1', fieldClassName)}>
<FieldLabel htmlFor={id} className="sr-only">
{label}
</FieldLabel>
<InputGroup className="min-h-11 rounded-[6px]">
<InputGroupInput
id={id}
type={type}
className={cn('min-h-11', className)}
{...props}
/>
<InputGroupAddon align="inline-start">
<SearchIcon aria-hidden="true" />
</InputGroupAddon>
</InputGroup>
</Field>
)