Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding font family selector to global styles #72

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading