@@ -91,10 +91,18 @@ export class PropertyShapeDocument extends PropertyDocumentMixin(LitElement) {
9191 * A description of the property to render.
9292 */
9393 propertyDescription : { type : String } ,
94+ /**
95+ * A description of the shape to render.
96+ */
97+ shapeDescription : { type : String } ,
9498 /**
9599 * Computed value, true if description is set.
96100 */
97101 hasPropertyDescription : { type : Boolean } ,
102+ /**
103+ * Computed value, true if description is set.
104+ */
105+ hasShapeDescription : { type : Boolean } ,
98106 /**
99107 * A property to set when the component is rendered in the narrow
100108 * view. To be used with mobile rendering or when the
@@ -223,6 +231,10 @@ export class PropertyShapeDocument extends PropertyDocumentMixin(LitElement) {
223231 }
224232 this . range = this . _computeRange ( shape ) ;
225233 this . isRequired = this . _computeIsRequired ( shape ) ;
234+ this . shapeDescription = this . _computeDescription ( shape ) ;
235+ this . hasShapeDescription = this . _computeHasStringValue (
236+ this . shapeDescription
237+ ) ;
226238 }
227239
228240 _rangeChanged ( range ) {
@@ -564,11 +576,11 @@ export class PropertyShapeDocument extends PropertyDocumentMixin(LitElement) {
564576 * @return {TemplateResult|string } Template for the description
565577 */
566578 _descriptionTemplate ( ) {
567- if ( ! this . hasPropertyDescription ) {
579+ if ( ! ( this . hasPropertyDescription || this . hasShapeDescription ) ) {
568580 return '' ;
569581 }
570582 return html `
571- < arc-marked .markdown ="${ this . propertyDescription } " sanitize >
583+ < arc-marked .markdown ="${ this . propertyDescription || this . shapeDescription } " sanitize >
572584 < div slot ="markdown-html " class ="markdown-body "> </ div >
573585 </ arc-marked >
574586 ` ;
0 commit comments