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"
|
||||
label="Fond coloré"
|
||||
/>
|
||||
<ToggleGroupControlOption
|
||||
value="framed-backgrounded"
|
||||
label="Cadre + fond coloré"
|
||||
/>
|
||||
</ToggleGroupControl>
|
||||
<ToggleGroupControl
|
||||
label="Largeur du bloc"
|
||||
|
|
@ -116,37 +120,40 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
<ToggleGroupControlOption value="full" label="Pleine largeur" />
|
||||
</ToggleGroupControl>
|
||||
|
||||
{blockVariant === "backgrounded" && (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<h1>Couleur de fond</h1>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<>
|
||||
<ColorPalette
|
||||
colors={filteredBgColors}
|
||||
value={backgroundColor}
|
||||
onChange={onBackgroundColorChange}
|
||||
/>
|
||||
</>
|
||||
</CardBody>
|
||||
</Card>
|
||||
)}
|
||||
{blockVariant === "backgrounded" ||
|
||||
(blockVariant === "framed-backgrounded" && (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<h1>Couleur de fond</h1>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<>
|
||||
<ColorPalette
|
||||
colors={filteredBgColors}
|
||||
value={backgroundColor}
|
||||
onChange={onBackgroundColorChange}
|
||||
/>
|
||||
</>
|
||||
</CardBody>
|
||||
</Card>
|
||||
))}
|
||||
|
||||
{blockVariant === "backgrounded" && postType !== "articles" && (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<h1>Couleur du texte </h1>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<ColorPalette
|
||||
colors={filteredTextColors}
|
||||
value={textColor}
|
||||
onChange={onTextColorChange}
|
||||
/>
|
||||
</CardBody>
|
||||
</Card>
|
||||
)}
|
||||
{(blockVariant === "backgrounded" ||
|
||||
blockVariant === "framed-backgrounded") &&
|
||||
postType !== "articles" && (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<h1>Couleur du texte </h1>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<ColorPalette
|
||||
colors={filteredTextColors}
|
||||
value={textColor}
|
||||
onChange={onTextColorChange}
|
||||
/>
|
||||
</CardBody>
|
||||
</Card>
|
||||
)}
|
||||
</PanelBody>
|
||||
</InspectorControls>
|
||||
<section
|
||||
|
|
@ -162,7 +169,10 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
style: {
|
||||
"--content-box-text-color": textColor ?? "inherit",
|
||||
"--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/buttons",
|
||||
"core/columns",
|
||||
"core/file",
|
||||
"core/post-title",
|
||||
"core/embed",
|
||||
"core/quote",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,10 @@ export default function save({ attributes }) {
|
|||
style: {
|
||||
"--content-box-text-color": textColor ?? "inherit",
|
||||
"--content-box-background-color":
|
||||
blockVariant === "backgrounded" ? backgroundColor : "transparent",
|
||||
blockVariant === "backgrounded" ||
|
||||
blockVariant === "framed-backgrounded"
|
||||
? backgroundColor
|
||||
: "transparent",
|
||||
},
|
||||
})}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user