8
0
Pārlūkot izejas kodu

Switch back to creating the label from View

panr 5 gadi atpakaļ
vecāks
revīzija
4d26f21b24

+ 8 - 6
packages/ckeditor5-ui/src/formheader/formheaderview.js

@@ -8,7 +8,6 @@
  */
 
 import View from '../view';
-import LabelView from '../label/labelview';
 
 import '../../theme/components/formheader/formheader.css';
 
@@ -21,7 +20,7 @@ export default class FormHeaderView extends View {
 		/**
 		 * The label of the header.
 		 *
-		 * @readonly
+		 * @observable
 		 * @member {String} #label
 		 */
 		this.set( 'label', options.label || '' );
@@ -54,16 +53,19 @@ export default class FormHeaderView extends View {
 			children: this.children
 		} );
 
-		const label = new LabelView( locale );
+		const label = new View( locale );
 
-		label.bind( 'text' ).to( this, 'label' );
-		label.extendTemplate( {
+		label.setTemplate( {
+			tag: 'span',
 			attributes: {
 				class: [
 					'ck',
 					'ck-form__header__label'
 				]
-			}
+			},
+			children: [
+				{ text: bind.to( 'label' ) }
+			]
 		} );
 
 		this.children.add( label );

+ 4 - 0
packages/ckeditor5-ui/theme/components/formheader/formheader.css

@@ -17,4 +17,8 @@
 	height: var(--ck-table-form-header-height);
 	line-height: var(--ck-table-form-header-height);
 	border-bottom: 1px solid var(--ck-color-base-border);
+
+	& .ck-form__header__label {
+		font-weight: bold;
+	}
 }