@@ -58,13 +58,17 @@ export class PftElementKnobs<T extends HTMLElement> extends LitElement {
5858 padding: 1em;
5959 }
6060
61+ section,
6162 dl#slot-descriptions {
6263 display: grid;
6364 gap: 8px;
6465 grid-template-columns: max-content auto;
6566 & dd {
6667 margin-inline-start: 0;
6768 }
69+ & > h2 {
70+ grid-column: -1/1;
71+ }
6872 }
6973
7074 pf-text-area {
@@ -157,23 +161,26 @@ export class PftElementKnobs<T extends HTMLElement> extends LitElement {
157161 element ?. getAttribute ( attribute . name )
158162 ?? attribute . default ?. replace ( QUOTE_RE , '$1' ) ;
159163 return html `
160- < h3 > < code > ${ attribute . name } </ code > </ h3 >
161- < zero-md > < script type ="text/markdown "> ${ attribute . summary ?? '' } </ script > </ zero-md >
162- < zero-md > < script type ="text/markdown "> ${ attribute . description ?? '' } </ script > </ zero-md >
164+ < pf-tooltip >
165+ < label for ="${ knobId } "> < code > ${ attribute . name } </ code > </ label > ${ [ attribute . summary , attribute . description ] . filter ( Boolean ) . map ( x => html `
166+ < zero-md slot ="content ">
167+ < template >
168+ < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown-dark.min.css ">
169+ </ template >
170+ < script type ="text/markdown "> ${ x } </ script >
171+ </ zero-md > ` ) }
172+ </ pf-tooltip >
163173 ${ isBoolean ? html `
164- < label for ="${ knobId } "> Present</ label >
165174 < pf-switch id ="${ knobId } "
166175 ?checked ="${ attribute . default === 'true' } "
167176 data-attribute ="${ attribute . name } "> </ pf-switch > ` : isEnum ? html `
168177 < pf-select id ="${ knobId } "
169178 placeholder ="Select a value "
170- aria-label ="Value "
171179 data-attribute ="${ attribute . name } "
172180 value ="${ ifDefined ( attributeValue ) } "> ${ values ! . map ( x => html `
173181 < pf-option > ${ x . trim ( ) . replace ( QUOTE_RE , '$1' ) } </ pf-option > ` ) }
174182 </ pf-select > ` : html `
175183 < pf-text-input id ="${ knobId } "
176- aria-label ="Value "
177184 value ="${ ifDefined ( attributeValue ) } "
178185 type ="${ ifDefined ( isNumber ? 'number' : undefined ) } "
179186 helper-text ="${ ifDefined ( attribute . type ?. text ) } "
0 commit comments