Move icon to a specific component
[MAILPOET-2741]
This commit is contained in:
@@ -4,6 +4,7 @@ import { useSelect, useDispatch } from '@wordpress/data';
|
|||||||
|
|
||||||
import FormPlacementSettings from './form_placement_settings';
|
import FormPlacementSettings from './form_placement_settings';
|
||||||
import Toggle from '../../../../common/toggle';
|
import Toggle from '../../../../common/toggle';
|
||||||
|
import Icon from './below_pages_icon';
|
||||||
|
|
||||||
const BelowPages = () => {
|
const BelowPages = () => {
|
||||||
const placeFormBellowAllPages = useSelect(
|
const placeFormBellowAllPages = useSelect(
|
||||||
@@ -37,6 +38,7 @@ const BelowPages = () => {
|
|||||||
onSave={save}
|
onSave={save}
|
||||||
description={MailPoet.I18n.t('placeFormBellowPagesDescription')}
|
description={MailPoet.I18n.t('placeFormBellowPagesDescription')}
|
||||||
label={MailPoet.I18n.t('placeFormBellowPages')}
|
label={MailPoet.I18n.t('placeFormBellowPages')}
|
||||||
|
icon={Icon}
|
||||||
>
|
>
|
||||||
<div className="mailpoet-toggle-list">
|
<div className="mailpoet-toggle-list">
|
||||||
<div className="mailpoet-toggle-list-description">
|
<div className="mailpoet-toggle-list-description">
|
||||||
|
@@ -3,7 +3,6 @@ import MailPoet from 'mailpoet';
|
|||||||
import { Button } from '@wordpress/components';
|
import { Button } from '@wordpress/components';
|
||||||
|
|
||||||
import FormPlacementOption from './form_placement_option';
|
import FormPlacementOption from './form_placement_option';
|
||||||
import Icon from './below_pages_icon';
|
|
||||||
import Modal from '../../../../common/modal/modal.jsx';
|
import Modal from '../../../../common/modal/modal.jsx';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -12,6 +11,7 @@ type Props = {
|
|||||||
active: boolean,
|
active: boolean,
|
||||||
label: string,
|
label: string,
|
||||||
description: string,
|
description: string,
|
||||||
|
icon: JSX.Element,
|
||||||
}
|
}
|
||||||
|
|
||||||
const BelowPages = ({
|
const BelowPages = ({
|
||||||
@@ -20,6 +20,7 @@ const BelowPages = ({
|
|||||||
active,
|
active,
|
||||||
onSave,
|
onSave,
|
||||||
children,
|
children,
|
||||||
|
icon,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [displaySettings, setDisplaySettings] = useState(false);
|
const [displaySettings, setDisplaySettings] = useState(false);
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@ const BelowPages = ({
|
|||||||
<>
|
<>
|
||||||
<FormPlacementOption
|
<FormPlacementOption
|
||||||
label={label}
|
label={label}
|
||||||
icon={Icon}
|
icon={icon}
|
||||||
active={active}
|
active={active}
|
||||||
onClick={() => setDisplaySettings(true)}
|
onClick={() => setDisplaySettings(true)}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user