mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(devtools): links to docs in property view tab
This commit is contained in:
parent
fc1e1bca4a
commit
1665bda6cc
3 changed files with 16 additions and 1 deletions
|
|
@ -4,6 +4,11 @@
|
|||
<mat-expansion-panel-header collapsedHeight="25px" expandedHeight="25px">
|
||||
<mat-panel-title>
|
||||
{{ panels[index].title }}
|
||||
<a href="{{ panels[index].documentation }}" target="_blank">
|
||||
<mat-icon class="docs-link">
|
||||
link
|
||||
</mat-icon>
|
||||
</a>
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<ng-property-view-tree
|
||||
|
|
|
|||
|
|
@ -14,6 +14,13 @@
|
|||
|
||||
.mat-expansion-panel-header {
|
||||
padding: 0 15px;
|
||||
|
||||
.docs-link {
|
||||
height: inherit;
|
||||
width: fit-content;
|
||||
font-size: initial;
|
||||
padding-left: 0.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-expansion-panel-header-title {
|
||||
|
|
|
|||
|
|
@ -22,22 +22,25 @@ export class PropertyViewBodyComponent {
|
|||
|
||||
categoryOrder = [0, 1, 2];
|
||||
|
||||
get panels(): { title: string; hidden: boolean; controls: DirectiveTreeData }[] {
|
||||
get panels(): { title: string; hidden: boolean; controls: DirectiveTreeData; documentation: string }[] {
|
||||
return [
|
||||
{
|
||||
title: '@Inputs',
|
||||
hidden: this.directiveInputControls.dataSource.data.length === 0,
|
||||
controls: this.directiveInputControls,
|
||||
documentation: 'https://angular.io/api/core/Input',
|
||||
},
|
||||
{
|
||||
title: '@Outputs',
|
||||
hidden: this.directiveOutputControls.dataSource.data.length === 0,
|
||||
controls: this.directiveOutputControls,
|
||||
documentation: 'https://angular.io/api/core/Output',
|
||||
},
|
||||
{
|
||||
title: 'Properties',
|
||||
hidden: this.directiveStateControls.dataSource.data.length === 0,
|
||||
controls: this.directiveStateControls,
|
||||
documentation: 'https://angular.io/guide/property-binding',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue