import { Ico, Icon } from "components/Ico"; import { cJoin } from "helpers/className"; import { isDefinedAndNotEmpty } from "helpers/others"; /* * ╭─────────────╮ * ───────────────────────────────────────╯ COMPONENT ╰─────────────────────────────────────────── */ interface Props { value: string; onChange: (newValue: string) => void; className?: string; name?: string; placeholder?: string; } // ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ export const TextInput = ({ value, onChange, className, name, placeholder, }: Props): JSX.Element => (
{ onChange(event.target.value); }} /> {isDefinedAndNotEmpty(value) && (
{ onChange(""); }} />
)}
);