Fix js tests
[MAILPOET-2835]
This commit is contained in:
@@ -1,37 +1,7 @@
|
||||
import MailPoet from 'mailpoet';
|
||||
import icon from './icon.jsx';
|
||||
import edit from './edit';
|
||||
|
||||
export enum Types {
|
||||
Divider = 'divider',
|
||||
Spacer = 'spacer',
|
||||
}
|
||||
|
||||
export enum Style {
|
||||
Solid = 'solid',
|
||||
Dashed = 'dashed',
|
||||
Dotted = 'dotted',
|
||||
}
|
||||
|
||||
export interface Attributes {
|
||||
className: string,
|
||||
height: number;
|
||||
type: Types;
|
||||
style: Style;
|
||||
dividerHeight: number;
|
||||
dividerWidth: number;
|
||||
color: string;
|
||||
}
|
||||
|
||||
export const defaultAttributes = {
|
||||
className: undefined,
|
||||
height: 1,
|
||||
type: Types.Divider,
|
||||
style: Style.Solid,
|
||||
dividerHeight: 1,
|
||||
dividerWidth: 100,
|
||||
color: 'black',
|
||||
};
|
||||
import { defaultAttributes } from './divider_types';
|
||||
|
||||
export const name = 'mailpoet-form/divider';
|
||||
|
||||
|
30
assets/js/src/form_editor/blocks/divider/divider_types.ts
Normal file
30
assets/js/src/form_editor/blocks/divider/divider_types.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
export enum Types {
|
||||
Divider = 'divider',
|
||||
Spacer = 'spacer',
|
||||
}
|
||||
|
||||
export enum Style {
|
||||
Solid = 'solid',
|
||||
Dashed = 'dashed',
|
||||
Dotted = 'dotted',
|
||||
}
|
||||
|
||||
export interface Attributes {
|
||||
className: string,
|
||||
height: number;
|
||||
type: Types;
|
||||
style: Style;
|
||||
dividerHeight: number;
|
||||
dividerWidth: number;
|
||||
color: string;
|
||||
}
|
||||
|
||||
export const defaultAttributes = {
|
||||
className: undefined,
|
||||
height: 1,
|
||||
type: Types.Divider,
|
||||
style: Style.Solid,
|
||||
dividerHeight: 1,
|
||||
dividerWidth: 100,
|
||||
color: 'black',
|
||||
};
|
@@ -10,11 +10,7 @@ import {
|
||||
SelectControl,
|
||||
ToggleControl,
|
||||
} from '@wordpress/components';
|
||||
import {
|
||||
Attributes,
|
||||
Style,
|
||||
Types,
|
||||
} from './divider';
|
||||
import { Attributes, Style, Types } from './divider_types';
|
||||
|
||||
type Props = {
|
||||
attributes: Attributes,
|
||||
|
@@ -2,7 +2,7 @@
|
||||
import { has } from 'lodash';
|
||||
import asNum from './server_value_as_num';
|
||||
import formatCustomFieldBlockName from '../blocks/format_custom_field_block_name.jsx';
|
||||
import { defaultAttributes as dividerDefaultAttributes } from '../blocks/divider/divider';
|
||||
import { defaultAttributes as dividerDefaultAttributes } from '../blocks/divider/divider_types';
|
||||
|
||||
const generateId = () => (`${Math.random().toString()}-${Date.now()}`);
|
||||
|
||||
|
Reference in New Issue
Block a user