2021-04-22 19:10:19 +02:00
|
|
|
import React from "react"
|
2021-04-26 18:36:41 +02:00
|
|
|
import Style from "./FormLabelled.module.css"
|
2021-04-22 19:10:19 +02:00
|
|
|
import classNames from "classnames"
|
|
|
|
|
|
|
|
|
2021-04-23 02:18:06 +02: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 18:36:41 +02:00
|
|
|
export default function FormLabelled({ children, className, ...props }) {
|
2021-04-22 19:10:19 +02:00
|
|
|
return (
|
|
|
|
<form className={classNames(Style.LabelledForm, className)} {...props}>
|
|
|
|
{children}
|
|
|
|
</form>
|
|
|
|
)
|
|
|
|
}
|