Skip to content

Commit

Permalink
Adding font family selector to global styles (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanisip authored Apr 10, 2024
1 parent 44c5484 commit 391c5c4
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React, { useState } from 'react';

import { Divider } from '@mui/material';

import EmailLayoutPropsSchema, {
EmailLayoutProps,
} from '../../../../documents/blocks/EmailLayout/EmailLayoutPropsSchema';

import BaseSidebarPanel from './helpers/BaseSidebarPanel';
import ColorInput from './helpers/inputs/ColorInput';
import { NullableFontFamily } from './helpers/inputs/FontFamily';

type EmailLayoutSidebarFieldsProps = {
data: EmailLayoutProps;
Expand All @@ -27,7 +26,7 @@ export default function EmailLayoutSidebarFields({ data, setData }: EmailLayoutS
};

return (
<BaseSidebarPanel title="Layout">
<BaseSidebarPanel title="Global">
<ColorInput
label="Backdrop color"
defaultValue={data.backdropColor ?? '#EEEEEE'}
Expand All @@ -38,7 +37,12 @@ export default function EmailLayoutSidebarFields({ data, setData }: EmailLayoutS
defaultValue={data.canvasColor ?? '#FFFFFF'}
onChange={(canvasColor) => updateData({ ...data, canvasColor })}
/>
<Divider />

<NullableFontFamily
label="Font family"
defaultValue="MODERN_SANS"
onChange={(fontFamily) => updateData({ ...data, fontFamily })}
/>
<ColorInput
label="Text color"
defaultValue={data.textColor ?? '#242424'}
Expand Down

0 comments on commit 391c5c4

Please sign in to comment.