[Product Block Editor]: use Label component to render Textarea field block label (#44222)

* use Label to render base control label

* changelog
This commit is contained in:
Damián Suárez 2024-02-02 18:57:41 -03:00 committed by GitHub
parent 207e8de73d
commit 4492698340
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: add
[Product Block Editor]: use Label component to render Textarea field block label

View File

@ -19,6 +19,7 @@ import type {
} from './types';
import AligmentToolbarButton from './toolbar/toolbar-button-alignment';
import useProductEntityProp from '../../../hooks/use-product-entity-prop';
import { Label } from '../../../components/label/label';
export function TextAreaBlockEdit( {
attributes,
@ -31,6 +32,8 @@ export function TextAreaBlockEdit( {
placeholder,
help,
required,
note,
tooltip,
disabled,
align,
allowedFormats,
@ -91,7 +94,14 @@ export function TextAreaBlockEdit( {
<BaseControl
id={ contentId.toString() }
label={ label }
label={
<Label
label={ label || '' }
required={ required }
note={ note }
tooltip={ tooltip }
/>
}
help={ help }
>
{ isRichTextMode && (