Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions projects/dxc-ngx-cdk/src/lib/dxc-sidenav/dxc-sidenav.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@ import { BehaviorSubject } from "rxjs";
import { css } from "emotion";
import { CssUtils } from "../utils";
import { BackgroundProviderService } from "../background-provider/service/background-provider.service";
import { SidenavProperties, Space, Spacing } from "./dxc-sidenav.types";

type Space =
| "xxsmall"
| "xsmall"
| "small"
| "medium"
| "large"
| "xlarge"
| "xxlarge";

type Padding = {
top?: Space;
bottom?: Space;
left?: Space;
right?: Space;
};
@Component({
selector: "dxc-sidenav",
templateUrl: "./dxc-sidenav.component.html",
Expand All @@ -41,14 +27,13 @@ export class DxcSidenavComponent implements OnInit {
* Size of the padding to be applied to the custom area ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different padding sizes.
*/
@Input() padding: Space | Padding;
@Input() padding: Space | Spacing;

firstClick: boolean = false; //remove animation on first load

currentBackgroundColor: string;

defaultInputs = new BehaviorSubject<any>({
displayArrow: true,
defaultInputs = new BehaviorSubject<SidenavProperties>({
padding: null,
});

Expand Down
19 changes: 19 additions & 0 deletions projects/dxc-ngx-cdk/src/lib/dxc-sidenav/dxc-sidenav.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export interface SidenavProperties {
padding?: Space | Spacing;
}

export type Space =
| "xxsmall"
| "xsmall"
| "small"
| "medium"
| "large"
| "xlarge"
| "xxlarge";

export type Spacing = {
top?: Space;
bottom?: Space;
left?: Space;
right?: Space;
};