Create list selection blok
[MAILPOET-2461]
This commit is contained in:
committed by
Rostislav Wolný
parent
39cde0ece5
commit
ecf660d733
@@ -5,6 +5,7 @@ import * as email from './email/email.jsx';
|
||||
import * as submit from './submit/submit.jsx';
|
||||
import * as firstName from './first_name/first_name.jsx';
|
||||
import * as lastName from './last_name/last_name.jsx';
|
||||
import * as segmentSelect from './segment_select/segment_select.jsx';
|
||||
|
||||
export default () => {
|
||||
setCategories([
|
||||
@@ -16,4 +17,5 @@ export default () => {
|
||||
registerBlockType(submit.name, submit.settings);
|
||||
registerBlockType(firstName.name, firstName.settings);
|
||||
registerBlockType(lastName.name, lastName.settings);
|
||||
registerBlockType(segmentSelect.name, segmentSelect.settings);
|
||||
};
|
||||
|
10
assets/js/src/form_editor/blocks/segment_select/icon.jsx
Normal file
10
assets/js/src/form_editor/blocks/segment_select/icon.jsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
import { G, Path, SVG } from '@wordpress/components';
|
||||
|
||||
export default (
|
||||
<SVG viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<G>
|
||||
<Path d="M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z" />
|
||||
</G>
|
||||
</SVG>
|
||||
);
|
@@ -0,0 +1,26 @@
|
||||
import MailPoet from 'mailpoet';
|
||||
import icon from './icon.jsx';
|
||||
|
||||
export const name = 'mailpoet-form/segment-select';
|
||||
|
||||
export const settings = {
|
||||
title: MailPoet.I18n.t('blockSegmentSelect'),
|
||||
description: MailPoet.I18n.t('blockLastNameDescription'),
|
||||
icon,
|
||||
category: 'fields',
|
||||
attributes: {
|
||||
label: {
|
||||
type: 'string',
|
||||
default: MailPoet.I18n.t('blockSegmentSelectLabel'),
|
||||
},
|
||||
},
|
||||
supports: {
|
||||
html: false,
|
||||
customClassName: false,
|
||||
multiple: false,
|
||||
},
|
||||
edit: () => {},
|
||||
save() {
|
||||
return null;
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user