ColorPicker label and help text not showing when set #14378
Labels
[Package] Components
/packages/components
[Priority] Low
Used to indicate that the issue at hand isn't a top priority to address and can be handled later
[Type] Enhancement
A suggestion for improvement.
Describe the bug
the ColorPicker element unlike all other elements does not show a label when set and also the "help" text is not shown either.
To Reproduce
Steps to reproduce the behavior:
This works as text input of type color:
wp.components.TextControl, { label: 'Badge background color:', help: 'Color for the badge background.', value: props.attributes.bg_color, type: 'color', onChange: function ( bg_color ) { props.setAttributes({ bg_color: bg_color } ) } }
This does not, it shows no label or help text at all
wp.components.ColorPicker, { label: 'Badge background color:', help: 'Color for the badge background.', value: props.attributes.bg_color, type: 'color', onChange: function ( bg_color ) { props.setAttributes({ bg_color: bg_color } ) } }
Expected behavior
Show a label and help text if set.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
WP 5.1
The text was updated successfully, but these errors were encountered: