teqo-backup/src/components/campaign/CampaignSearchInput.tsx
Francisco Ignácio Fontoura Solla bcac665cb5 Ship /campanha nuclei MVP with RBAC, invites, and vote estimates.
Adds electoral nuclei, leaderships, updates, and WhatsApp invite flows behind campaign auth, plus the consolidated schema migration that Vercel applies on deploy.
2026-07-18 15:01:56 -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>
)