Skip to content

Commit

Permalink
Merge pull request #18 from eoxia-amandine/add_block_accordion
Browse files Browse the repository at this point in the history
#16 [Blocks] add: Accordion block
  • Loading branch information
eoxia-amandine authored Oct 24, 2024
2 parents 6af5eb2 + 8c8e579 commit 32a7b71
Show file tree
Hide file tree
Showing 33 changed files with 2,936 additions and 39 deletions.
61 changes: 61 additions & 0 deletions blocks/build/accordion/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "eo/accordion",
"version": "1.0.0",
"title": "Accordion",
"category": "design",
"icon": "smiley",
"description": "Display accordion block",
"example": {},
"attributes": {
"titleTag": {
"type": "string",
"default": "h2"
},
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"isOpened": {
"type": "boolean",
"default": false
}
},
"supports": {
"color": {
"background": "true",
"color": "true"
},
"spacing": {
"margin": true,
"padding": false,
"blockGap": false
},
"shadow": true,
"html": false,
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true,
"__experimentalDefaultControls": {
"color": true,
"radius": true,
"style": true,
"width": true
}
}
},
"textdomain": "accordion",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": [
"file:./style-index.css",
"dashicons"
],
"render": "file:./render.php",
"viewScript": "file:./view.js"
}
17 changes: 17 additions & 0 deletions blocks/build/accordion/index-rtl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*!**************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./blocks/src/accordion/scss/editor.scss ***!
\**************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied inside the editor only.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-eo-accordion .eo-accordion__header:hover {
cursor: auto;
}
.wp-block-eo-accordion .eo-accordion__header:hover .eo-accordion__title {
opacity: 1;
}
.wp-block-eo-accordion .eo-accordion__header:hover .eo-accordion__header-toggle::before {
opacity: 0.4 !important;
}
1 change: 1 addition & 0 deletions blocks/build/accordion/index.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => 'a9726c820cd1a3452ab9');
19 changes: 19 additions & 0 deletions blocks/build/accordion/index.css

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

1 change: 1 addition & 0 deletions blocks/build/accordion/index.css.map

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

Loading

0 comments on commit 32a7b71

Please sign in to comment.