File tree Expand file tree Collapse file tree 5 files changed +71
-4
lines changed
src/pybind/mgr/dashboard/frontend/src/app/shared/components Expand file tree Collapse file tree 5 files changed +71
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ import {
3737 ComboBoxModule ,
3838 ProgressIndicatorModule ,
3939 PanelModule ,
40- LayoutModule
40+ LayoutModule ,
41+ TilesModule
4142} from 'carbon-components-angular' ;
4243import EditIcon from '@carbon/icons/es/edit/20' ;
4344import CodeIcon from '@carbon/icons/es/code/16' ;
@@ -87,6 +88,7 @@ import { SidePanelComponent } from './side-panel/side-panel.component';
8788import { ChartsModule } from '@carbon/charts-angular' ;
8889import { InlineMessageComponent } from './inline-message/inline-message.component' ;
8990import { IconComponent } from './icon/icon.component' ;
91+ import { DetailsCardComponent } from './details-card/details-card.component' ;
9092
9193// Icons
9294import InfoIcon from '@carbon/icons/es/information/16' ;
@@ -135,7 +137,8 @@ import CloseIcon from '@carbon/icons/es/close/16';
135137 BaseChartDirective ,
136138 PanelModule ,
137139 ChartsModule ,
138- LayoutModule
140+ LayoutModule ,
141+ TilesModule
139142 ] ,
140143 declarations : [
141144 SparklineComponent ,
@@ -180,7 +183,8 @@ import CloseIcon from '@carbon/icons/es/close/16';
180183 ProgressComponent ,
181184 SidePanelComponent ,
182185 IconComponent ,
183- InlineMessageComponent
186+ InlineMessageComponent ,
187+ DetailsCardComponent
184188 ] ,
185189 providers : [ provideCharts ( withDefaultRegisterables ( ) ) ] ,
186190 exports : [
@@ -222,7 +226,8 @@ import CloseIcon from '@carbon/icons/es/close/16';
222226 ProgressComponent ,
223227 SidePanelComponent ,
224228 IconComponent ,
225- InlineMessageComponent
229+ InlineMessageComponent ,
230+ DetailsCardComponent
226231 ]
227232} )
228233export class ComponentsModule {
Original file line number Diff line number Diff line change 1+ < cds-tile >
2+ < div class ="details-card-header ">
3+ < span class ="cds--type-heading-03 "
4+ i18n > {{ cardTitle }}</ span >
5+ </ div >
6+
7+ < div class ="details-card-body ">
8+ < div cdsRow >
9+ < ng-content select =".details-body-content "> </ ng-content >
10+ </ div >
11+ </ div >
12+ </ cds-tile >
Original file line number Diff line number Diff line change 1+ @use ' @carbon/layout' ;
2+
3+ .details-card-header {
4+ align-items : center ;
5+ display : flex ;
6+ justify-content : space-between ;
7+ padding-bottom : layout .$spacing-05 ;
8+ position : relative ;
9+ }
10+
11+ ::ng-deep .cds--label {
12+ display : block ;
13+ }
14+
15+ .cds--row {
16+ row-gap : layout .$spacing-05 ;
17+ }
Original file line number Diff line number Diff line change 1+ import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2+
3+ import { DetailsCardComponent } from './details-card.component' ;
4+
5+ describe ( 'DetailsCardComponent' , ( ) => {
6+ let component : DetailsCardComponent ;
7+ let fixture : ComponentFixture < DetailsCardComponent > ;
8+
9+ beforeEach ( async ( ) => {
10+ await TestBed . configureTestingModule ( {
11+ declarations : [ DetailsCardComponent ]
12+ } ) . compileComponents ( ) ;
13+
14+ fixture = TestBed . createComponent ( DetailsCardComponent ) ;
15+ component = fixture . componentInstance ;
16+ fixture . detectChanges ( ) ;
17+ } ) ;
18+
19+ it ( 'should create' , ( ) => {
20+ expect ( component ) . toBeTruthy ( ) ;
21+ } ) ;
22+ } ) ;
Original file line number Diff line number Diff line change 1+ import { Component , Input } from '@angular/core' ;
2+
3+ @Component ( {
4+ selector : 'cd-details-card' ,
5+ templateUrl : './details-card.component.html' ,
6+ styleUrl : './details-card.component.scss'
7+ } )
8+ export class DetailsCardComponent {
9+ @Input ( )
10+ cardTitle : string ;
11+ }
You can’t perform that action at this time.
0 commit comments