Init(Core): add to repo and add seeders
This commit is contained in:
13
resources/js/Components/SelectInput.jsx
Normal file
13
resources/js/Components/SelectInput.jsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import CreatableSelect from 'react-select/creatable';
|
||||
|
||||
import { useState } from 'react'
|
||||
|
||||
export default function Input({ options, value, setValue, onCreateOption, id, label, className, placeholder=null, isMulti=false}) {
|
||||
|
||||
return (
|
||||
<div className={"relative flex flex-col" + " " + className}>
|
||||
<label className="pr-3 pb-0.5">{ label }</label>
|
||||
<CreatableSelect isClearable value={ value } onChange={(newValue) => setValue(newValue)} onCreateOption={(e) => onCreateOption(e) } formatCreateLabel={(inputValue) => "ایجاد " + label + ' "' + inputValue + '"'} placeholder={placeholder} options={options} isMulti={isMulti}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user