mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
* tip tap version 2 * youtube * menu-bar * refactorng layout * fixed flex layout * fixed flex layout * a lot of ui fixes * optimizing flex layout & styling inputs * markdown styling * fix linting * updated snapshots * layout optimization * flex layout optimizations, text editor fine tuning and markdown rendering * updated snapshots --------- Co-authored-by: Anton Tranelis <mail@antontranelis.de> Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
61 lines
1.5 KiB
TypeScript
61 lines
1.5 KiB
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
import { TextInput } from '#components/Input'
|
|
|
|
import type { FormState } from '#types/FormState'
|
|
|
|
export const ContactInfoForm = ({
|
|
state,
|
|
setState,
|
|
}: {
|
|
state: FormState
|
|
setState: React.Dispatch<React.SetStateAction<any>>
|
|
}) => {
|
|
return (
|
|
<div className='tw:mt-2 tw:space-y-2'>
|
|
<div>
|
|
<label
|
|
htmlFor='email'
|
|
className='tw:block tw:text-sm tw:font-medium tw:text-gray-500 tw:mb-1'
|
|
>
|
|
Email-Adresse (Kontakt):
|
|
</label>
|
|
<TextInput
|
|
placeholder='Email'
|
|
type='email'
|
|
required={false}
|
|
defaultValue={state.contact}
|
|
updateFormValue={(v) =>
|
|
setState((prevState) => ({
|
|
...prevState,
|
|
contact: v,
|
|
}))
|
|
}
|
|
/>
|
|
</div>
|
|
|
|
<div>
|
|
<label
|
|
htmlFor='telephone'
|
|
className='tw:block tw:text-sm tw:font-medium tw:text-gray-500 tw:mb-1'
|
|
>
|
|
Telefonnummer (Kontakt):
|
|
</label>
|
|
<TextInput
|
|
placeholder='Telefonnummer'
|
|
type='tel'
|
|
required={false}
|
|
pattern='^\+?[0-9\s\-]{7,15}$'
|
|
defaultValue={state.telephone}
|
|
updateFormValue={(v) =>
|
|
setState((prevState) => ({
|
|
...prevState,
|
|
telephone: v,
|
|
}))
|
|
}
|
|
/>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|