Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Classname change coming in core Button component #306

Open
mindctrl opened this issue Feb 13, 2020 · 0 comments
Open

Classname change coming in core Button component #306

mindctrl opened this issue Feb 13, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@mindctrl
Copy link
Contributor

There's a classname change coming in the core Button component.

In previous versions, the icon buttons used to rely internally on the components-icon-button. Now that the Button and IconButton components are merged into a single component, this class name has been removed and is replaced with .components-button.has-icon.

Note that it is recommended that you don’t rely on any internal className used by the different components. if you want to target a specific component, prefer providing your own className prop and use it instead.

Source: https://make.wordpress.org/core/2020/02/13/an-updated-button-component-in-wordpress-5-4/

We use this class in the Layouts button we add to the toolbar, and if we're relying on core CSS to style it, we'll need to update.

html += `<button id="abLayoutInsertButton" class="components-button components-icon-button" aria-label="${ __( 'Insert Layout', 'atomic-blocks' ) }"><i class="dashicons dashicons-layout ab-toolbar-insert-layout-button"></i> ${ __( 'Layouts', 'atomic-blocks' ) }</button>`;

@mindctrl mindctrl added the bug Something isn't working label Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant