2021-04-21 16:58:14 +00:00
|
|
|
import React from "react"
|
|
|
|
import Style from "./Select.module.css"
|
|
|
|
import classNames from "classnames"
|
|
|
|
|
|
|
|
|
2021-04-23 00:18:06 +00:00
|
|
|
/**
|
|
|
|
* A dropdown list.
|
|
|
|
*
|
|
|
|
* @param children - The contents of the dropdown list, which usually should be `<option>` or `<optgroup>` elements.
|
|
|
|
* @param className - Additional class(es) to add to the element.
|
|
|
|
* @param props - Additional props to pass to the element.
|
|
|
|
* @returns {JSX.Element}
|
|
|
|
* @constructor
|
|
|
|
*/
|
2021-04-21 16:58:14 +00:00
|
|
|
export default function Select({ children, className, ...props }) {
|
|
|
|
return (
|
|
|
|
<select className={classNames(Style.Select, className)} {...props}>
|
|
|
|
{children}
|
|
|
|
</select>
|
|
|
|
)
|
|
|
|
}
|