Description
openedon Mar 11, 2019
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):
- OS: Ubuntu
- Browser chrome
- Version 65
WP 5.1