@@ -21,29 +21,8 @@ import {
2121import { DxcAccordionIconComponent } from "./dxc-accordion-icon/dxc-accordion-icon.component" ;
2222import { QueryList , ChangeDetectorRef , ElementRef } from "@angular/core" ;
2323import { BackgroundProviderComponent } from "../background-provider/background-provider.component" ;
24+ import { AccordionProperties , Space , Spacing } from "./dxc-accordion.types" ;
2425
25- type Space =
26- | "xxsmall"
27- | "xsmall"
28- | "small"
29- | "medium"
30- | "large"
31- | "xlarge"
32- | "xxlarge" ;
33-
34- type Margin = {
35- top ?: Space ;
36- bottom ?: Space ;
37- left ?: Space ;
38- right ?: Space ;
39- } ;
40-
41- type Padding = {
42- top ?: Space ;
43- bottom ?: Space ;
44- left ?: Space ;
45- right ?: Space ;
46- } ;
4726
4827@Component ( {
4928 selector : "dxc-accordion" ,
@@ -84,12 +63,12 @@ export class DxcAccordionComponent implements OnInit, OnChanges, AfterViewInit {
8463 * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
8564 * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
8665 */
87- @Input ( ) margin : Space | Margin ;
66+ @Input ( ) margin : Space | Spacing ;
8867 /**
8968 * Size of the padding to be applied to the custom area ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
9069 * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different padding sizes.
9170 */
92- @Input ( ) padding : Space | Padding ;
71+ @Input ( ) padding : Space | Spacing ;
9372 /**
9473 * Represents the state of the panel. When true, the component will be
9574 * expanded. If undefined, the component will be uncontrolled and its
@@ -126,7 +105,10 @@ export class DxcAccordionComponent implements OnInit, OnChanges, AfterViewInit {
126105 @ContentChildren ( DxcAccordionIconComponent )
127106 dxcAccordionIcon : QueryList < DxcAccordionIconComponent > ;
128107
129- defaultInputs = new BehaviorSubject < any > ( {
108+ defaultInputs = new BehaviorSubject < AccordionProperties > ( {
109+ label : "" ,
110+ assistiveText : "" ,
111+ isExpanded : false ,
130112 margin : null ,
131113 padding : null ,
132114 disabled : false ,
0 commit comments