mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
feat: added select
This commit is contained in:
parent
47f3b9a739
commit
f03e5f3b3e
18
components/Form/Select.tsx
Normal file
18
components/Form/Select.tsx
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { Field } from 'formik'
|
||||||
|
|
||||||
|
const Select = ({ name, options }:SelectProps):JSX.Element => {
|
||||||
|
return <Field as='select' name={name} className='text-black w-full h-10 border border-grey-light rounded px-3 relative focus:shadow outline-none'>
|
||||||
|
{
|
||||||
|
options.map(o => (
|
||||||
|
<option key={o}>{o}</option>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</Field>
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SelectProps {
|
||||||
|
name: string
|
||||||
|
options: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Select
|
||||||
Loading…
x
Reference in New Issue
Block a user