Skip to content

Commit

Permalink
Eoxia#16 [Blocks] add: Accordion block change toggle icon
Browse files Browse the repository at this point in the history
  • Loading branch information
eoxia-amandine committed Oct 24, 2024
1 parent 0ea5b3b commit 8c8e579
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion blocks/build/accordion/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-i18n', 'wp-primitives'), 'version' => 'dfd431d76258f50b9b4d');
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => 'a9726c820cd1a3452ab9');
2 changes: 1 addition & 1 deletion blocks/build/accordion/index.js

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

2 changes: 1 addition & 1 deletion blocks/build/accordion/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion blocks/build/accordion/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$title,
esc_attr( $titleTag )
); ?>
<span class="eo-accordion__header-toggle dashicons dashicons-plus-alt2"></span>
<span class="eo-accordion__header-toggle dashicons dashicons-arrow-right-alt2"></span>
</div>
<?php if ( ! empty( $subtitle ) ) : ?>
<div class="eo-accordion__subtitle"><?php echo esc_html( $subtitle ); ?></div>
Expand Down
6 changes: 3 additions & 3 deletions blocks/build/accordion/style-index-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
font-weight: 700;
}
.wp-block-eo-accordion .eo-accordion__header .eo-accordion__header-container .eo-accordion__header-toggle {
transition: transform 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53);
transition: transform 0.2s ease-out;
}
.wp-block-eo-accordion .eo-accordion__header .eo-accordion__header-container .eo-accordion__header-toggle::before {
opacity: 0.4;
transition: all 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53);
transition: all 0.2s ease-out;
transform-origin: center;
}
.wp-block-eo-accordion .eo-accordion__inner {
Expand All @@ -60,7 +60,7 @@
margin-bottom: 0;
}
.wp-block-eo-accordion .eo-accordion__main-container.eo-accordion__active .eo-accordion__header-toggle {
transform: rotate(-45deg);
transform: rotate(-90deg);
}
.wp-block-eo-accordion .eo-accordion__main-container:not(.eo-accordion__active) .eo-accordion__inner {
opacity: 0;
Expand Down
6 changes: 3 additions & 3 deletions blocks/build/accordion/style-index.css

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

2 changes: 1 addition & 1 deletion blocks/build/accordion/style-index.css.map

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

2 changes: 1 addition & 1 deletion blocks/src/accordion/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default function Edit( { attributes, setAttributes } ) {
onChange={(title) => setAttributes({title})}
placeholder={ __( 'Title', 'eo-blocks' ) }
/>
<span className="eo-accordion__header-toggle dashicons dashicons-plus-alt2"></span>
<span className="eo-accordion__header-toggle dashicons dashicons-arrow-right-alt2"></span>
</div>

<RichText
Expand Down
2 changes: 1 addition & 1 deletion blocks/src/accordion/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$title,
esc_attr( $titleTag )
); ?>
<span class="eo-accordion__header-toggle dashicons dashicons-plus-alt2"></span>
<span class="eo-accordion__header-toggle dashicons dashicons-arrow-right-alt2"></span>
</div>
<?php if ( ! empty( $subtitle ) ) : ?>
<div class="eo-accordion__subtitle"><?php echo esc_html( $subtitle ); ?></div>
Expand Down
6 changes: 3 additions & 3 deletions blocks/src/accordion/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ $media__mobile: 599px;
font-weight: 700;
}
.eo-accordion__header-toggle {
transition: transform 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53);
transition: transform 0.2s ease-out;
}
.eo-accordion__header-toggle::before {
//width: 15px;
//fill: rgba(0,0,0,1);
opacity: 0.4;
transition: all 0.2s cubic-bezier(0.64, 0.57, 0.67, 1.53);
transition: all 0.2s ease-out;
transform-origin: center;
}
}
Expand All @@ -72,7 +72,7 @@ $media__mobile: 599px;

.eo-accordion__main-container.eo-accordion__active {
.eo-accordion__header-toggle {
transform: rotate(45deg);
transform: rotate(90deg);
}
}
.eo-accordion__main-container:not(.eo-accordion__active) {
Expand Down

0 comments on commit 8c8e579

Please sign in to comment.