Add first, empty item

[MAILPOET-2849]
This commit is contained in:
Pavel Dohnal
2020-05-28 16:09:56 +02:00
committed by Veljko V
parent 6908f17364
commit c2dfa0fb77

View File

@ -83,11 +83,17 @@ const FontSelect = ({
}: Props) => {
const fonts = [
{
label: 'standard',
label: 'Themes default fonts',
value: undefined,
},
{
label: 'Standard fonts',
value: '',
options: [],
},
{
label: 'custom',
label: 'Custom fonts',
value: '',
options: [],
},
];
@ -100,8 +106,8 @@ const FontSelect = ({
},
});
standardFonts.forEach((fontName) => fonts[0].options.push(buildOption(fontName)));
customFonts.forEach((fontName) => fonts[1].options.push(buildOption(fontName)));
standardFonts.forEach((fontName) => fonts[1].options.push(buildOption(fontName)));
customFonts.forEach((fontName) => fonts[2].options.push(buildOption(fontName)));
return (
<Select