mirror of
https://github.com/flarum/core.git
synced 2025-08-07 17:07:19 +02:00
chore: do not render form header when label or description is not present (#4035)
This commit is contained in:
@@ -14,10 +14,12 @@ export default class Form<CustomAttrs extends IFormAttrs = IFormAttrs> extends C
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classList('Form', className)} {...attrs}>
|
<div className={classList('Form', className)} {...attrs}>
|
||||||
<div className="Form-header">
|
{(label || description) && (
|
||||||
{label && <label>{label}</label>}
|
<div className="Form-header">
|
||||||
{description && <p className="helpText">{description}</p>}
|
{label && <label>{label}</label>}
|
||||||
</div>
|
{description && <p className="helpText">{description}</p>}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="Form-body">{vnode.children}</div>
|
<div className="Form-body">{vnode.children}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user