diff --git a/src/components/Form/WysiwygControls/BlockStyleToolbar.js b/src/components/Form/WysiwygControls/BlockStyleToolbar.js index 7382c1e4..6da8e4d8 100644 --- a/src/components/Form/WysiwygControls/BlockStyleToolbar.js +++ b/src/components/Form/WysiwygControls/BlockStyleToolbar.js @@ -4,10 +4,12 @@ import { RichUtils } from 'draft-js' import 'draft-js/dist/Draft.css' // FPCC -import WysiwygControls from 'components/Form/WysiwygControls' +import Button from 'components/Form/WysiwygControls/Button' +import HeaderSelect from 'components/Form/WysiwygControls/HeaderSelect' import getIcon from 'common/utils/getIcon' export const headerBlockTypes = [ + { label: 'Normal', value: 'unstyled' }, { label: 'Heading', value: 'header-two' }, { label: 'Subheading', value: 'header-three' }, ] @@ -27,14 +29,14 @@ function BlockStyleToolbar({ editorState, onChange, toolbar }) { return ( {toolbar?.includes('HEADER') && ( - )} {toolbar?.includes('OL') && ( - toggleBlockType(event, 'ordered-list-item') } @@ -43,7 +45,7 @@ function BlockStyleToolbar({ editorState, onChange, toolbar }) { /> )} {toolbar?.includes('UL') && ( - toggleBlockType(event, 'unordered-list-item') } diff --git a/src/components/Form/WysiwygControls/HeaderSelect.js b/src/components/Form/WysiwygControls/HeaderSelect.js index 41e2ff67..3e01f935 100644 --- a/src/components/Form/WysiwygControls/HeaderSelect.js +++ b/src/components/Form/WysiwygControls/HeaderSelect.js @@ -14,7 +14,6 @@ function HeaderSelect({ value, handleSelectChange, headerBlockTypes }) { onChange={onToggle} className="border-r border-charcoal-100 pl-3 pr-10 py-2 focus:outline-none focus:ring-scarlet-800 focus:border-scarlet-800 text-sm" > - {headerBlockTypes.map((heading) => (