2021-04-22 17:10:19 +00:00
|
|
|
import React from "react"
|
2021-04-26 16:36:41 +00:00
|
|
|
import Style from "./FormLabelled.module.css"
|
2021-04-22 17:10:19 +00:00
|
|
|
import classNames from "classnames"
|
|
|
|
|
|
|
|
|
2021-04-23 00:18:06 +00:00
|
|
|
/**
|
|
|
|
* A form with two columns: the leftmost one contains labels, while the rightmost one contains input elements.
|
|
|
|
*
|
|
|
|
* @returns {JSX.Element}
|
|
|
|
* @constructor
|
|
|
|
*/
|
2021-04-26 16:36:41 +00:00
|
|
|
export default function FormLabelled({ children, className, ...props }) {
|
2021-04-22 17:10:19 +00:00
|
|
|
return (
|
|
|
|
<form className={classNames(Style.LabelledForm, className)} {...props}>
|
|
|
|
{children}
|
|
|
|
</form>
|
|
|
|
)
|
|
|
|
}
|