Make description optional

[MAILPOET-2678]
This commit is contained in:
Amine Ben hammou
2020-03-17 13:06:17 +01:00
committed by Veljko V
parent a119276cae
commit 51e9c24158

View File

@@ -2,13 +2,13 @@ import React, { ReactNode } from 'react';
type Props = {
title: string
description: ReactNode
description?: ReactNode
htmlFor: string
}
export default ({ title, description, htmlFor }: Props) => (
<div className="mailpoet-settings-label">
<label className="mailpoet-settings-label-title" htmlFor={htmlFor}>{title}</label>
<p className="description">{description}</p>
{description && <p className="description">{description}</p>}
</div>
);