@@ -91,10 +91,18 @@ export class PropertyShapeDocument extends PropertyDocumentMixin(LitElement) {
91
91
* A description of the property to render.
92
92
*/
93
93
propertyDescription : { type : String } ,
94
+ /**
95
+ * A description of the shape to render.
96
+ */
97
+ shapeDescription : { type : String } ,
94
98
/**
95
99
* Computed value, true if description is set.
96
100
*/
97
101
hasPropertyDescription : { type : Boolean } ,
102
+ /**
103
+ * Computed value, true if description is set.
104
+ */
105
+ hasShapeDescription : { type : Boolean } ,
98
106
/**
99
107
* A property to set when the component is rendered in the narrow
100
108
* view. To be used with mobile rendering or when the
@@ -223,6 +231,10 @@ export class PropertyShapeDocument extends PropertyDocumentMixin(LitElement) {
223
231
}
224
232
this . range = this . _computeRange ( shape ) ;
225
233
this . isRequired = this . _computeIsRequired ( shape ) ;
234
+ this . shapeDescription = this . _computeDescription ( shape ) ;
235
+ this . hasShapeDescription = this . _computeHasStringValue (
236
+ this . shapeDescription
237
+ ) ;
226
238
}
227
239
228
240
_rangeChanged ( range ) {
@@ -564,11 +576,11 @@ export class PropertyShapeDocument extends PropertyDocumentMixin(LitElement) {
564
576
* @return {TemplateResult|string } Template for the description
565
577
*/
566
578
_descriptionTemplate ( ) {
567
- if ( ! this . hasPropertyDescription ) {
579
+ if ( ! ( this . hasPropertyDescription || this . hasShapeDescription ) ) {
568
580
return '' ;
569
581
}
570
582
return html `
571
- < arc-marked .markdown ="${ this . propertyDescription } " sanitize >
583
+ < arc-marked .markdown ="${ this . propertyDescription || this . shapeDescription } " sanitize >
572
584
< div slot ="markdown-html " class ="markdown-body "> </ div >
573
585
</ arc-marked >
574
586
` ;
0 commit comments