import React, { useId } from 'react' import { InputSearch, type InputSearchProps } from '~components/Input/InputSearch' import { Label } from '~components/Label' import styles from './SearchField.module.css' export type SearchFieldProps = Omit & { id?: string labelText: string disabled?: boolean reversed?: boolean secondary?: boolean } /** * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3081896613/Search+Field Guidance} | * {@link https://cultureamp.design/?path=/docs/components-search-field--docs Storybook} */ export const SearchField = ({ id: propsId, labelText, disabled, reversed = false, secondary = false, classNameOverride, ...restProps }: SearchFieldProps): JSX.Element => { const showVisibleLabel = !secondary const reactId = useId() const id = propsId ?? reactId // @todo: Move restProps to container div? return (
{showVisibleLabel && (
) } SearchField.displayName = 'SearchField'