FEATURE Handling email button variation
This commit is contained in:
parent
7bb9b66b5f
commit
e159cb4ba0
|
|
@ -1,4 +1,18 @@
|
|||
wp.blocks.registerBlockStyle("core/buttons", {
|
||||
import { registerBlockStyle, registerBlockVariation } from "@wordpress/blocks";
|
||||
|
||||
registerBlockStyle("core/buttons", {
|
||||
name: "big-buttons",
|
||||
label: "Grands boutons ",
|
||||
});
|
||||
|
||||
registerBlockVariation("core/button", {
|
||||
name: "email-button",
|
||||
title: "Bouton email",
|
||||
description: "Ajoute une icone email devant le texte.",
|
||||
attributes: {
|
||||
className: "email-button",
|
||||
},
|
||||
isActive: ({ className = "" }) =>
|
||||
className.split(/\s+/).includes("email-button"),
|
||||
scope: ["inserter", "transform", "block"],
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user