Skip to content

Commit

Permalink
Extend mock base chart in mock charts (#3030)
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusKjeldgaard authored May 2, 2023
1 parent 2e67cad commit 6200442
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import { Component, forwardRef, Input } from '@angular/core';

import { ChartComponent, ChartType } from '@kirbydesign/designsystem';

// IMPORTANT: MockChartComponent class needs to extend MockBaseChartComponent
// see https://github.com/kirbydesign/designsystem/issues/3029
import { MockBaseChartComponent } from './mock.base-chart.component';

// #region AUTO-GENERATED - PLEASE DON'T EDIT CONTENT WITHIN!
@Component({
selector: 'kirby-chart',
Expand All @@ -13,7 +17,7 @@ import { ChartComponent, ChartType } from '@kirbydesign/designsystem';
},
],
})
export class MockChartComponent {
export class MockChartComponent extends MockBaseChartComponent {
@Input() type: Exclude<ChartType, 'stock'>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { Component, forwardRef, Input } from '@angular/core';
import { StockChartComponent } from '@kirbydesign/designsystem';
import { ChartDataLabelOptions } from '@kirbydesign/designsystem/chart';

// IMPORTANT: MockStockChartComponent class needs to extend MockBaseChartComponent
// see https://github.com/kirbydesign/designsystem/issues/3029
import { MockBaseChartComponent } from './mock.base-chart.component';

// #region AUTO-GENERATED - PLEASE DON'T EDIT CONTENT WITHIN!
@Component({
selector: 'kirby-stock-chart',
Expand All @@ -14,7 +18,7 @@ import { ChartDataLabelOptions } from '@kirbydesign/designsystem/chart';
},
],
})
export class MockStockChartComponent {
export class MockStockChartComponent extends MockBaseChartComponent {
@Input() dataLabelOptions?: ChartDataLabelOptions;
}

Expand Down

0 comments on commit 6200442

Please sign in to comment.