FEATURE handling native alignements
This commit is contained in:
parent
9eda00022e
commit
4c353ab77b
|
|
@ -49,7 +49,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
const filteredTextColors = filterTextColors(
|
||||
colors,
|
||||
postType,
|
||||
backgroundColor
|
||||
backgroundColor,
|
||||
);
|
||||
|
||||
function onBackgroundColorChange(value) {
|
||||
|
|
@ -111,8 +111,9 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
__nextHasNoMarginBottom
|
||||
__next40pxDefaultSize
|
||||
>
|
||||
<ToggleGroupControlOption value="full" label="Pleine largeur" />
|
||||
<ToggleGroupControlOption value="contained" label="Contenue" />
|
||||
<ToggleGroupControlOption value="wide" label="Large" />
|
||||
<ToggleGroupControlOption value="full" label="Pleine largeur" />
|
||||
</ToggleGroupControl>
|
||||
|
||||
{blockVariant === "backgrounded" && (
|
||||
|
|
@ -157,7 +158,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
? "content-box--bg-light"
|
||||
: "content-box--bg-dark"
|
||||
}
|
||||
${blockWidth === "contained" ? "alignwide" : "alignfull"}`,
|
||||
${blockWidth === "contained" ? "aligncontained" : blockWidth === "wide" ? "alignwide" : "alignfull"}`,
|
||||
style: {
|
||||
"--content-box-text-color": textColor ?? "inherit",
|
||||
"--content-box-background-color":
|
||||
|
|
@ -192,6 +193,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
"carhop-blocks/cta",
|
||||
"carhop-blocks/cta-group",
|
||||
"carhop-blocks/audio-player",
|
||||
"carhop-blocks/content-box",
|
||||
"carhop-blocks/localisation-map",
|
||||
"carhop-blocks/notice-panel",
|
||||
"carhop-blocks/story-timeline",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default function save({ attributes }) {
|
|||
className: `content-box content-box--variant-${blockVariant} ${
|
||||
hasLightBackground ? "content-box--bg-light" : "content-box--bg-dark"
|
||||
}
|
||||
${blockWidth === "contained" ? "alignwide" : "alignfull"}`,
|
||||
${blockWidth === "contained" ? "aligncontained" : blockWidth === "wide" ? "alignwide" : "alignfull"}`,
|
||||
style: {
|
||||
"--content-box-text-color": textColor ?? "inherit",
|
||||
"--content-box-background-color":
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user