forked from cerc-io/snowballtools-base
* Create layout for create project with template * Handle create project with tempalte form * Refactor pages folder according to routes * Add navigation to create project with template page --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com>
34 lines
665 B
TypeScript
34 lines
665 B
TypeScript
import React from 'react';
|
|
import {
|
|
default as ReactDropdown,
|
|
Option as ReactDropdownOption,
|
|
} from 'react-dropdown';
|
|
import 'react-dropdown/style.css';
|
|
|
|
interface Option {
|
|
value: string;
|
|
label: string;
|
|
}
|
|
|
|
interface DropdownProps {
|
|
options: Option[];
|
|
onChange: (arg: ReactDropdownOption) => void;
|
|
placeholder?: string;
|
|
value?: Option;
|
|
}
|
|
|
|
const Dropdown = ({ placeholder, options, onChange, value }: DropdownProps) => {
|
|
return (
|
|
<ReactDropdown
|
|
options={options}
|
|
placeholder={placeholder}
|
|
className="h-full"
|
|
controlClassName="h-full"
|
|
onChange={onChange}
|
|
value={value}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default Dropdown;
|