Files
calendar/packages/ui/form/AddressInput.tsx
T
Alex van AndelandGitHub b9128a7a0b chore: Add ./components/[name]/index.ts map to package.json (#17319)
* chore: Add ./components/[name]/index.ts map to package.json

* fix: Clarify Popover exports

* fix: re-add dropdown to calcom/ui barrel

* chore: Add icon barrel file re-export

* Fix all calcom/ui imports of its own barrel

* Never say 'fix all remaining..' it's never true

* Some type fixeS

* Linking fixes

* Rename sheet.tsx to Sheet.tsx

Done through UI, console does NOT like this.

* Fixed some test failures
2024-10-25 23:05:29 +01:00

36 lines
823 B
TypeScript

import cx from "@calcom/lib/classNames";
import { Input } from "../components/form";
import { Icon } from "../components/icon";
export type AddressInputProps = {
value: string;
id?: string;
placeholder?: string;
required?: boolean;
onChange: (val: string) => void;
className?: string;
};
function AddressInput({ value, onChange, ...rest }: AddressInputProps) {
return (
<div className="relative flex items-center">
<Icon
name="map-pin"
className="text-muted absolute left-0.5 ml-3 h-4 w-4 -translate-y-1/2"
style={{ top: "44%" }}
/>
<Input
{...rest}
value={value}
onChange={(e) => {
onChange(e.target.value);
}}
className={cx("pl-10", rest?.className)}
/>
</div>
);
}
export default AddressInput;