From 51eb311ae051d883e1dae06ffa35484078988565 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:47:12 +1000 Subject: [PATCH] Buttons: Add border, color, and padding block supports (#63538) Co-authored-by: aaronrobertshaw Co-authored-by: carolinan --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/buttons/block.json | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index e796b29ff662fb..08a299bc17b71c 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -61,7 +61,7 @@ Prompt visitors to take action with a group of button-style links. ([Source](htt - **Name:** core/buttons - **Category:** design - **Allowed Blocks:** core/button -- **Supports:** align (full, wide), anchor, interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), anchor, color (background, gradients, ~~text~~), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ ## Calendar diff --git a/packages/block-library/src/buttons/block.json b/packages/block-library/src/buttons/block.json index 015290a4c7cc58..220f6ef8fd1e27 100644 --- a/packages/block-library/src/buttons/block.json +++ b/packages/block-library/src/buttons/block.json @@ -13,8 +13,16 @@ "align": [ "wide", "full" ], "html": false, "__experimentalExposeControlsToChildren": true, + "color": { + "gradients": true, + "text": false, + "__experimentalDefaultControls": { + "background": true + } + }, "spacing": { "blockGap": true, + "padding": true, "margin": [ "top", "bottom" ], "__experimentalDefaultControls": { "blockGap": true @@ -33,6 +41,18 @@ "fontSize": true } }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, "layout": { "allowSwitching": false, "allowInheriting": false,