Skip to content

Commit

Permalink
add tagChoises
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHalkin committed Jul 18, 2024
1 parent 78e6ecd commit 26c3a26
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions blocks/Section/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,23 @@
"supports": {},
"example": {},
"attributes": {
"tagChoises": {
"type": "object",
"default": [
"section",
"div",
"main",
"article",
"aside",
"header",
"footer"
]
},
"modification": {
"type": "object",
"default": {
"backgroundColor": {},
"textColor": {},
"selector": [
"section",
"div",
"main",
"article",
"aside",
"header",
"footer"
],
"tagName": "section",
"colorTheme": ""
}
Expand Down
2 changes: 1 addition & 1 deletion blocks/Section/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ registerBlockType(
const dataBsThemeAttribute = attributes.modification.colorTheme
? {'data-bs-theme': attributes.modification.colorTheme}
: {};
const selectorOptions = getSelectorOptions(attributes.modification.selector);
const selectorOptions = getSelectorOptions(attributes.tagChoises);
const renderControls = (
<InspectorControls key="controls">
<PanelBody title="Section styles">
Expand Down

0 comments on commit 26c3a26

Please sign in to comment.