Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit button in the Audio block uses invalid buttonProps attribute #4019

Closed
bradyvercher opened this issue Dec 14, 2017 · 0 comments · Fixed by #4029
Closed

Edit button in the Audio block uses invalid buttonProps attribute #4019

bradyvercher opened this issue Dec 14, 2017 · 0 comments · Fixed by #4029
Assignees
Labels
[Type] Bug An existing feature does not function as intended

Comments

@bradyvercher
Copy link
Contributor

Issue Overview

The Edit button in the BlockControls element of the Audio block attempts to set an invalid buttonProps attribute, which throws a warning in the console.

Steps to Reproduce (for bugs)

  1. Insert an Audio block
  2. Check the console

Possible Solution

This is the current markup:

<Button
	buttonProps={ {
		className: 'components-icon-button components-toolbar__control',
		'aria-label': __( 'Edit audio' ),
	} }
	type="audio"
	onClick={ switchToEditing }
>
	<Dashicon icon="edit" />
</Button>

Those props should probably be flattened to:

<Button
	className="components-icon-button components-toolbar__control"
	aria-label={ __( 'Edit audio' ) }
	type="audio"
	onClick={ switchToEditing }
>
	<Dashicon icon="edit" />
</Button>

Screenshots / Video

screen shot 2017-12-14 at 3 40 36 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants