Make description optional
[MAILPOET-2678]
This commit is contained in:
committed by
Veljko V
parent
a119276cae
commit
51e9c24158
@@ -2,13 +2,13 @@ import React, { ReactNode } from 'react';
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
title: string
|
title: string
|
||||||
description: ReactNode
|
description?: ReactNode
|
||||||
htmlFor: string
|
htmlFor: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ({ title, description, htmlFor }: Props) => (
|
export default ({ title, description, htmlFor }: Props) => (
|
||||||
<div className="mailpoet-settings-label">
|
<div className="mailpoet-settings-label">
|
||||||
<label className="mailpoet-settings-label-title" htmlFor={htmlFor}>{title}</label>
|
<label className="mailpoet-settings-label-title" htmlFor={htmlFor}>{title}</label>
|
||||||
<p className="description">{description}</p>
|
{description && <p className="description">{description}</p>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user