Skip to content

Commit

Permalink
Updated Animated Headlines Block
Browse files Browse the repository at this point in the history
  • Loading branch information
mhimon committed Apr 26, 2021
1 parent 668a077 commit b512294
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
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' => 'b0ce861f65967d51e1be221c083358ed');
<?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' => 'cbd7c960f5b1eee202761a6fc84bf4b7');
4 changes: 2 additions & 2 deletions assets/js/pb-blocks-editor.js

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions src/blocks/animated-headlines/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import classnames from 'classnames';

import Inspector from './inspector';

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


import './editor.scss';
import Styles from './style';
Expand All @@ -23,9 +21,6 @@ const edit = ( props ) => {
animatedText,
} = attributes;

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

if ( props.isSelected && ! props.blockId ) {
const clientId = props.clientId;
setAttributes( { blockId: clientId.replace( /-/g, '' ) } );
Expand All @@ -44,9 +39,7 @@ const edit = ( props ) => {
className={ classnames(
'pb-animated-text-wrapper',
props.className,
...classes
) }
{ ... blockAttr }
>
<Tag className={ `pb-animated-txt ${animationType}`} >
{ prefixText ? (
Expand Down
7 changes: 0 additions & 7 deletions src/blocks/animated-headlines/save.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const { RichText, InnerBlocks } = wp.blockEditor;
const { __ } = wp.i18n;
import classnames from 'classnames';

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

const save = ( { attributes, className } ) => {
const {
Expand All @@ -14,9 +12,6 @@ const save = ( { attributes, className } ) => {
animatedText,
} = attributes;

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

const Tag = textTag;

return (
Expand All @@ -26,9 +21,7 @@ const save = ( { attributes, className } ) => {
className={ classnames(
className,
'pb-animated-text-wrapper',
...classes
) }
{ ...blockAttr }
>
<Tag className={ `pb-animated-txt ${animationType}`} >
{ prefixText ? (
Expand Down

0 comments on commit b512294

Please sign in to comment.