@@ -19,22 +19,7 @@ import {
1919 coerceNumberProperty ,
2020} from "@angular/cdk/coercion" ;
2121import { BackgroundProviderService } from "../background-provider/service/background-provider.service" ;
22-
23- type Space =
24- | "xxsmall"
25- | "xsmall"
26- | "small"
27- | "medium"
28- | "large"
29- | "xlarge"
30- | "xxlarge" ;
31-
32- type Size = {
33- top ?: Space ;
34- bottom ?: Space ;
35- left ?: Space ;
36- right ?: Space ;
37- } ;
22+ import { Space , Spacing , CardProperties } from "./dxc-card.types"
3823
3924@Component ( {
4025 selector : "dxc-card" ,
@@ -59,7 +44,7 @@ export class DxcCardComponent implements OnInit {
5944 * You can pass an object with 'top', 'bottom', 'left' and 'right' properties
6045 * in order to specify different padding sizes.
6146 */
62- @Input ( ) imagePadding : Space | Size ;
47+ @Input ( ) imagePadding : Space | Spacing ;
6348
6449 /**
6550 * Whether the image should appear in relation to the content.
@@ -72,7 +57,7 @@ export class DxcCardComponent implements OnInit {
7257 * You can pass an object with 'top', 'bottom', 'left' and 'right' properties
7358 * in order to specify different padding sizes.
7459 */
75- @Input ( ) contentPadding : Space | Size ;
60+ @Input ( ) contentPadding : Space | Spacing ;
7661
7762 /**
7863 * If defined, the card will be displayed as an anchor, using this prop as "href".
@@ -104,7 +89,7 @@ export class DxcCardComponent implements OnInit {
10489 * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in
10590 * order to specify different margin sizes.
10691 */
107- @Input ( ) margin : Space | Size ;
92+ @Input ( ) margin : Space | Spacing ;
10893
10994 /**
11095 * Value of the tabindex given when there is an href.
@@ -129,7 +114,7 @@ export class DxcCardComponent implements OnInit {
129114
130115 @ViewChild ( "content" , { static : false } ) content : ElementRef ;
131116
132- defaultInputs = new BehaviorSubject < any > ( {
117+ defaultInputs = new BehaviorSubject < CardProperties > ( {
133118 imageSrc : null ,
134119 imageBgColor : "black" ,
135120 imagePadding : null ,
0 commit comments