Skip to content

Commit

Permalink
Implement wrapper for accordion content to allow animation of panel w…
Browse files Browse the repository at this point in the history
…ith grid rows
  • Loading branch information
brettsmason committed Sep 30, 2024
1 parent 54a8019 commit 3ab65d5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/accordion-item/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '9002d527be62535085b0');
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '6b9f9337a6f9d4643766');
2 changes: 1 addition & 1 deletion dist/accordion-item/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/accordion-item/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ class="wp-block-pulsar-accordion__title"
aria-labelledby="<?php echo esc_attr( $attributes['id'] ); ?>-title"
class="wp-block-pulsar-accordion__panel"
>
<?php echo $content; // phpcs:disable ?>
<div class="wp-block-pulsar-accordion__panel-inner">
<?php echo $content; // phpcs:disable ?>
</div>
</div>
</div>
<?php endif; ?>
2 changes: 1 addition & 1 deletion pulsar-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: A collection of blocks we use at eighteen73.
* Requires at least: 6.3
* Requires PHP: 7.4
* Version: 0.8.1
* Version: 0.8.2
* Author: eighteen73
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down
6 changes: 4 additions & 2 deletions src/accordion-item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function Edit({ attributes, setAttributes, clientId, context }) {

const innerBlocksProps = useInnerBlocksProps(
{
className: 'wp-block-pulsar-accordion__panel',
className: 'wp-block-pulsar-accordion__panel-inner',
},
{
orientation: 'vertical',
Expand All @@ -67,7 +67,9 @@ export default function Edit({ attributes, setAttributes, clientId, context }) {
</button>
</TagName>

<div {...innerBlocksProps}></div>
<div className="wp-block-pulsar-accordion__panel">
<div {...innerBlocksProps}></div>
</div>
</div>
);
}
4 changes: 3 additions & 1 deletion src/accordion-item/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ class="wp-block-pulsar-accordion__title"
aria-labelledby="<?php echo esc_attr( $attributes['id'] ); ?>-title"
class="wp-block-pulsar-accordion__panel"
>
<?php echo $content; // phpcs:disable ?>
<div class="wp-block-pulsar-accordion__panel-inner">
<?php echo $content; // phpcs:disable ?>
</div>
</div>
</div>
<?php endif; ?>

0 comments on commit 3ab65d5

Please sign in to comment.