create download maps modal

This commit is contained in:
MathieuG-P
2022-12-04 01:08:18 +01:00
parent abdc05298b
commit 341e8aed99
13 changed files with 201 additions and 27 deletions
@@ -0,0 +1,28 @@
import { ChangeEvent, CSSProperties } from "react"
type Props = {
className?: string,
style?: CSSProperties,
options?: BsmSelectOption[],
onChange?: (value: any) => void
}
export function BsmSelect({className, style, options, onChange}: Props) {
const handleChange = (event: ChangeEvent<HTMLSelectElement>) => {
onChange?.(event.target.value);
}
return (
<select className={className} style={style} onChange={handleChange}>
{options && options.map(option => (
<option key={option.value} value={option.value}>{option.text}</option>
))}
</select>
)
}
export interface BsmSelectOption{
text: string,
value: string
}