FIX Mistake

This commit is contained in:
Antoine M 2025-10-01 12:30:35 +02:00
parent 8a6a3c48f1
commit b3fa948ccf
5 changed files with 44 additions and 33 deletions

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '1c6fc2bb0489b28aa083');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => 'ca8961fe68bd680871dd');

View File

@ -262,15 +262,17 @@ function Edit({
"--chapter-section-text-color": textColor ? textColor : "#136f63"
}
}),
children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
width: "1302",
height: "654",
viewBox: "0 0 1302 654",
preserveAspectRatio: "none",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("path", {
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
fill: backgroundColor
children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
width: "1302",
height: "654",
viewBox: "0 0 1302 654",
preserveAspectRatio: "none",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("path", {
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
fill: backgroundColor
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "chapter-section__content",
@ -389,9 +391,11 @@ function save({
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} ${backgroundColor ? "chapter-section--has-background" : ""} ${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}`,
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition}
${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}
${hasBackgroundColor && backgroundColor ? "chapter-section--has-background" : ""}`,
style: {
"--chapter-section-text-color": textColor
"--chapter-section-text-color": textColor ? textColor : "#136f63"
}
}),
children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {

File diff suppressed because one or more lines are too long

View File

@ -201,18 +201,20 @@ export default function Edit({ attributes, setAttributes, ...props }) {
})}
>
{hasBackgroundColor && backgroundColor && (
<svg
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
width="1302"
height="654"
viewBox="0 0 1302 654"
preserveAspectRatio="none"
>
<path
d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z"
fill={backgroundColor}
/>
</svg>
<>
<svg
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
width="1302"
height="654"
viewBox="0 0 1302 654"
preserveAspectRatio="none"
>
<path
d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z"
fill={backgroundColor}
/>
</svg>
</>
)}
<div className="chapter-section__content">
<div className="chapter-section__innerblocks">

View File

@ -12,18 +12,23 @@ export default function save({ attributes }) {
blockWidth,
textColor,
} = attributes;
return (
<section
{...useBlockProps.save({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} ${
backgroundColor ? "chapter-section--has-background" : ""
} ${
blockWidth === "full"
? "chapter-section--width-full"
: "chapter-section--width-contained"
}`,
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition}
${
blockWidth === "full"
? "chapter-section--width-full"
: "chapter-section--width-contained"
}
${
hasBackgroundColor && backgroundColor
? "chapter-section--has-background"
: ""
}`,
style: {
"--chapter-section-text-color": textColor,
"--chapter-section-text-color": textColor ? textColor : "#136f63",
},
})}
>