Skip to content

Commit

Permalink
Updated Testimonial Block
Browse files Browse the repository at this point in the history
  • Loading branch information
mhimon committed Apr 26, 2021
1 parent 2362c1c commit 7f3c8c4
Show file tree
Hide file tree
Showing 10 changed files with 625 additions and 769 deletions.
2 changes: 1 addition & 1 deletion assets/css/pb-styles.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/pb-blocks-editor.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b5e9f711757d3d89f5955c5b95c71336');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '198cf0f32454fa683ccece8c58937c97');
6 changes: 3 additions & 3 deletions assets/js/pb-blocks-editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/pb-styles.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '3459686b1b9d00d362ecb085e94f53d4');
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '3eb3cb0a9d76a3dca3eae1d7ccd835ed');
5 changes: 1 addition & 4 deletions src/blocks/testimonial/attributes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { __ } from '@wordpress/i18n';

import advancedAttributes from '../../helper/advancedAttributes';

const attributes = {
blockId: {
type: 'string',
Expand Down Expand Up @@ -553,5 +551,4 @@ const attributes = {
},
};

const finalAttributes = { ...attributes, ...advancedAttributes };
export default finalAttributes;
export default attributes;
24 changes: 4 additions & 20 deletions src/blocks/testimonial/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const { Button } = wp.components;
import classnames from 'classnames';

import Inspector from './inspector';
import { genClass, blockAttributes } from '../../helper';


import './editor.scss';
import Styles from './style';
Expand All @@ -15,7 +13,6 @@ const edit = ( props ) => {

const {
blockId,
backgroundType,
content,
imageData,
name,
Expand All @@ -28,18 +25,8 @@ const edit = ( props ) => {
showRatings,
ratingsPosition,
preset,
hideOnDesktop,
hideOnTablet,
hideOnMobile,
blockWidth,
customClass,
customID,
displayBubble,

addWLink,
wrapperLink,
wrapperLinkNewTab,
wrapperLinkNofollow,
bubbleSize
} = attributes;

if ( props.isSelected && ! props.blockId ) {
Expand All @@ -51,9 +38,6 @@ const edit = ( props ) => {
];
const allowedBlocks = [ 'powerful-blocks/star-rating' ];

const classes = genClass( attributes, 'edit' );
const blockAttr = blockAttributes( attributes, 'edit' );

return (
<>
<Inspector { ...{ attributes, setAttributes } } />
Expand All @@ -66,11 +50,11 @@ const edit = ( props ) => {
'pb-testimonial-client-info-position',
preset,
true === displayBubble ? 'pb-t-bubble' : '',
...classes
) }
{ ... blockAttr }
>
<div className="pb-testimonial--conr">
<div
className="pb-testimonial--conr"
>
{ true === showRatings &&
'before-content' === ratingsPosition && (
<div className="pb-testimonial--rating">
Expand Down
Loading

0 comments on commit 7f3c8c4

Please sign in to comment.