FEATURE introducing new variation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ccc2d0008f
commit
90a7a16dfb
|
|
@ -102,6 +102,10 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
value="backgrounded"
|
value="backgrounded"
|
||||||
label="Fond coloré"
|
label="Fond coloré"
|
||||||
/>
|
/>
|
||||||
|
<ToggleGroupControlOption
|
||||||
|
value="framed-backgrounded"
|
||||||
|
label="Cadre + fond coloré"
|
||||||
|
/>
|
||||||
</ToggleGroupControl>
|
</ToggleGroupControl>
|
||||||
<ToggleGroupControl
|
<ToggleGroupControl
|
||||||
label="Largeur du bloc"
|
label="Largeur du bloc"
|
||||||
|
|
@ -116,37 +120,40 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
<ToggleGroupControlOption value="full" label="Pleine largeur" />
|
<ToggleGroupControlOption value="full" label="Pleine largeur" />
|
||||||
</ToggleGroupControl>
|
</ToggleGroupControl>
|
||||||
|
|
||||||
{blockVariant === "backgrounded" && (
|
{blockVariant === "backgrounded" ||
|
||||||
<Card>
|
(blockVariant === "framed-backgrounded" && (
|
||||||
<CardHeader>
|
<Card>
|
||||||
<h1>Couleur de fond</h1>
|
<CardHeader>
|
||||||
</CardHeader>
|
<h1>Couleur de fond</h1>
|
||||||
<CardBody>
|
</CardHeader>
|
||||||
<>
|
<CardBody>
|
||||||
<ColorPalette
|
<>
|
||||||
colors={filteredBgColors}
|
<ColorPalette
|
||||||
value={backgroundColor}
|
colors={filteredBgColors}
|
||||||
onChange={onBackgroundColorChange}
|
value={backgroundColor}
|
||||||
/>
|
onChange={onBackgroundColorChange}
|
||||||
</>
|
/>
|
||||||
</CardBody>
|
</>
|
||||||
</Card>
|
</CardBody>
|
||||||
)}
|
</Card>
|
||||||
|
))}
|
||||||
|
|
||||||
{blockVariant === "backgrounded" && postType !== "articles" && (
|
{(blockVariant === "backgrounded" ||
|
||||||
<Card>
|
blockVariant === "framed-backgrounded") &&
|
||||||
<CardHeader>
|
postType !== "articles" && (
|
||||||
<h1>Couleur du texte </h1>
|
<Card>
|
||||||
</CardHeader>
|
<CardHeader>
|
||||||
<CardBody>
|
<h1>Couleur du texte </h1>
|
||||||
<ColorPalette
|
</CardHeader>
|
||||||
colors={filteredTextColors}
|
<CardBody>
|
||||||
value={textColor}
|
<ColorPalette
|
||||||
onChange={onTextColorChange}
|
colors={filteredTextColors}
|
||||||
/>
|
value={textColor}
|
||||||
</CardBody>
|
onChange={onTextColorChange}
|
||||||
</Card>
|
/>
|
||||||
)}
|
</CardBody>
|
||||||
|
</Card>
|
||||||
|
)}
|
||||||
</PanelBody>
|
</PanelBody>
|
||||||
</InspectorControls>
|
</InspectorControls>
|
||||||
<section
|
<section
|
||||||
|
|
@ -162,7 +169,10 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
style: {
|
style: {
|
||||||
"--content-box-text-color": textColor ?? "inherit",
|
"--content-box-text-color": textColor ?? "inherit",
|
||||||
"--content-box-background-color":
|
"--content-box-background-color":
|
||||||
blockVariant === "backgrounded" ? backgroundColor : "transparent",
|
blockVariant === "backgrounded" ||
|
||||||
|
blockVariant === "framed-backgrounded"
|
||||||
|
? backgroundColor
|
||||||
|
: "transparent",
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
|
@ -180,6 +190,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
"core/image",
|
"core/image",
|
||||||
"core/buttons",
|
"core/buttons",
|
||||||
"core/columns",
|
"core/columns",
|
||||||
|
"core/file",
|
||||||
"core/post-title",
|
"core/post-title",
|
||||||
"core/embed",
|
"core/embed",
|
||||||
"core/quote",
|
"core/quote",
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,10 @@ export default function save({ attributes }) {
|
||||||
style: {
|
style: {
|
||||||
"--content-box-text-color": textColor ?? "inherit",
|
"--content-box-text-color": textColor ?? "inherit",
|
||||||
"--content-box-background-color":
|
"--content-box-background-color":
|
||||||
blockVariant === "backgrounded" ? backgroundColor : "transparent",
|
blockVariant === "backgrounded" ||
|
||||||
|
blockVariant === "framed-backgrounded"
|
||||||
|
? backgroundColor
|
||||||
|
: "transparent",
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user