Move type to store
[MAILPOET-2911]
This commit is contained in:
@@ -12,7 +12,7 @@ import { useSelect } from '@wordpress/data';
|
||||
|
||||
import ParagraphEdit from '../paragraph_edit.jsx';
|
||||
import StylesSettings from './styles_settings';
|
||||
import { FormSettingsType } from '../../components/form_settings/form_settings';
|
||||
import { FormSettingsType } from '../../store/form_data_types';
|
||||
|
||||
const SubmitEdit = ({ attributes, setAttributes }) => {
|
||||
const settings: FormSettingsType = useSelect(
|
||||
|
@@ -7,46 +7,6 @@ import StylesSettingsPanel from './styles_settings_panel';
|
||||
import FormPlacementPanel from './form_placement_panel';
|
||||
import CustomCssPanel from './custom_css_panel';
|
||||
|
||||
type PlacementStyles = {
|
||||
width: {
|
||||
unit: string
|
||||
value: number
|
||||
}
|
||||
}
|
||||
|
||||
export type FormSettingsType = {
|
||||
alignment: string
|
||||
backgroundImageDisplay?: string
|
||||
backgroundImageUrl?: string
|
||||
belowPostStyles: PlacementStyles
|
||||
borderColor?: string
|
||||
borderRadius: number
|
||||
borderSize: number
|
||||
errorValidationColor?: string
|
||||
fixedBarFormDelay: number
|
||||
fixedBarFormPosition: string
|
||||
fixedBarStyles: PlacementStyles
|
||||
fontFamily?: string
|
||||
formPadding: number
|
||||
inputPadding: number
|
||||
otherStyles: PlacementStyles
|
||||
placeFixedBarFormOnAllPages: boolean
|
||||
placeFixedBarFormOnAllPosts: boolean
|
||||
placeFormBellowAllPages: boolean
|
||||
placeFormBellowAllPosts: boolean
|
||||
placePopupFormOnAllPages: boolean
|
||||
placePopupFormOnAllPosts: boolean
|
||||
placeSlideInFormOnAllPages: boolean
|
||||
placeSlideInFormOnAllPosts: boolean
|
||||
popupFormDelay: number
|
||||
popupStyles: PlacementStyles
|
||||
segments: Array<string>
|
||||
slideInFormDelay: number
|
||||
slideInFormPosition: string
|
||||
slideInStyles: PlacementStyles
|
||||
successValidationColor?: string
|
||||
};
|
||||
|
||||
export default () => {
|
||||
const { toggleSidebarPanel } = useDispatch('mailpoet-form-editor');
|
||||
const openedPanels = useSelect(
|
||||
|
39
assets/js/src/form_editor/store/form_data_types.ts
Normal file
39
assets/js/src/form_editor/store/form_data_types.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
type PlacementStyles = {
|
||||
width: {
|
||||
unit: string
|
||||
value: number
|
||||
}
|
||||
}
|
||||
|
||||
export type FormSettingsType = {
|
||||
alignment: string
|
||||
backgroundImageDisplay?: string
|
||||
backgroundImageUrl?: string
|
||||
belowPostStyles: PlacementStyles
|
||||
borderColor?: string
|
||||
borderRadius: number
|
||||
borderSize: number
|
||||
errorValidationColor?: string
|
||||
fixedBarFormDelay: number
|
||||
fixedBarFormPosition: string
|
||||
fixedBarStyles: PlacementStyles
|
||||
fontFamily?: string
|
||||
formPadding: number
|
||||
inputPadding: number
|
||||
otherStyles: PlacementStyles
|
||||
placeFixedBarFormOnAllPages: boolean
|
||||
placeFixedBarFormOnAllPosts: boolean
|
||||
placeFormBellowAllPages: boolean
|
||||
placeFormBellowAllPosts: boolean
|
||||
placePopupFormOnAllPages: boolean
|
||||
placePopupFormOnAllPosts: boolean
|
||||
placeSlideInFormOnAllPages: boolean
|
||||
placeSlideInFormOnAllPosts: boolean
|
||||
popupFormDelay: number
|
||||
popupStyles: PlacementStyles
|
||||
segments: Array<string>
|
||||
slideInFormDelay: number
|
||||
slideInFormPosition: string
|
||||
slideInStyles: PlacementStyles
|
||||
successValidationColor?: string
|
||||
};
|
Reference in New Issue
Block a user