A free and open-source block-based email template builder.
TypeScript amazonsesdeveloper-toolsemailemail-editoremail-marketingemail-templateemail-template-builderemailapiemailjshtml-email-editorno-codenocode-email-editoropen-source-email-buildersendgridtransactional-emailswysiwyg-email-editorwysiwyg-html-editor
import React from 'react';
import { FirstPageOutlined, MenuOutlined } from '@mui/icons-material';
import { IconButton } from '@mui/material';
import { toggleSamplesDrawerOpen, useSamplesDrawerOpen } from '../../documents/editor/EditorContext';
function useIcon() {
const samplesDrawerOpen = useSamplesDrawerOpen();
if (samplesDrawerOpen) {
return <FirstPageOutlined fontSize="small" />;
}
return <MenuOutlined fontSize="small" />;
}
export default function ToggleSamplesPanelButton() {
const icon = useIcon();
return <IconButton onClick={toggleSamplesDrawerOpen}>{icon}</IconButton>;
}