Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/blocks/rowlayout/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
setDynamicState,
hasKadenceCustomCss,
getBlockDefaults,
getSpacingOptionOutput,
} from '@kadence/helpers';

/**
Expand All @@ -68,7 +69,7 @@ import StyleControls from './style-controls';
import PaddingResizer from './padding-resizer';
import renderSVGDivider from './render-svg-divider';
import GridVisualizer from './gridvisualizer';
import { getGutterTotal, getPreviewGutterSize, getSpacingOptionOutput } from './utils';
import { getGutterTotal, getPreviewGutterSize } from './utils';
import { SPACING_SIZES_MAP, COLUMN_WIDTH_MAP } from './constants';
import { runRowLayoutMigrations } from './migrations';
/**
Expand Down
10 changes: 1 addition & 9 deletions src/blocks/rowlayout/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -737,14 +737,6 @@ div.kb-blocks-bg-video {
height: auto;
width: 100%;
}
.block-editor-block-list__block[data-type="kadence/rowlayout"] {
margin-top: 0;
margin-bottom: 0;
}
.block-editor-block-list__block[data-type="kadence/rowlayout"] > .wp-block {
margin-top: 0;
margin-bottom: 0;
}
.wp-block-kadence-rowlayout.has-border-radius {
overflow: clip;
}
Expand Down Expand Up @@ -1075,7 +1067,7 @@ div.kb-blocks-bg-video {
.kb-blocks-bg-slider .kb-gallery-pause-button {
opacity: 0.25;
}

.kb-blocks-bg-slider:hover .kb-gallery-pause-button {
opacity: 1;
}
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/rowlayout/gridvisualizer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import classnames from 'classnames';
import { Button, Tooltip, ResizableBox } from '@wordpress/components';
import { getGutterPercentUnit, getGutterTotal, getPreviewGutterSize, getSpacingOptionOutput } from './utils';
import { getGutterPercentUnit, getGutterTotal, getPreviewGutterSize } from './utils';
import { getSpacingOptionOutput } from '@kadence/helpers';
/**
* Internal block libraries
*/
Expand Down
4 changes: 1 addition & 3 deletions src/blocks/rowlayout/row-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

import { times } from 'lodash';
import { Splide, SplideSlide } from '@splidejs/react-splide';
import { KadenceColorOutput, getPreviewSize, getBorderStyle } from '@kadence/helpers';
import { KadenceColorOutput, getPreviewSize, getBorderStyle, getSpacingOptionOutput } from '@kadence/helpers';
import { useBlockProps } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';

import { getSpacingOptionOutput } from './utils';

/**
* Build the row edit
*/
Expand Down
19 changes: 0 additions & 19 deletions src/blocks/rowlayout/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,6 @@ export function getSpacingOptionName(value, unit) {
}
return found.name;
}
export function getSpacingOptionOutput(value, unit) {
if (undefined === value) {
return '';
}
if (!SPACING_SIZES_MAP) {
return value;
}
if (value === '0') {
return '0' + unit;
}
if (value === 0) {
return '0' + unit;
}
const found = SPACING_SIZES_MAP.find((option) => option.value === value);
if (!found) {
return value + unit;
}
return found.output;
}
export function getSpacingOptionSize(value) {
if (!value) {
return 0;
Expand Down
19 changes: 0 additions & 19 deletions src/packages/components/src/column-drag-resizer/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,6 @@ export function getSpacingOptionName(value, unit) {
}
return found.name;
}
export function getSpacingOptionOutput(value, unit) {
if (undefined === value) {
return '';
}
if (!SPACING_SIZES_MAP) {
return value;
}
if (value === '0') {
return '0' + unit;
}
if (value === 0) {
return '0' + unit;
}
const found = SPACING_SIZES_MAP.find((option) => option.value === value);
if (!found) {
return value + unit;
}
return found.output;
}
export function getSpacingOptionSize(value) {
if (!value) {
return 0;
Expand Down