Skip to content

Commit

Permalink
fix: strict
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiashader committed Oct 10, 2024
1 parent edf3bfb commit cc9c40f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5855,7 +5855,7 @@ declare namespace LocalJSX {
/**
* Icon of the Header
*/
"icon"?: string;
"icon": string;
/**
* Icon color
*/
Expand Down
12 changes: 7 additions & 5 deletions packages/core/src/components/modal-header/modal-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ModalHeader {
/**
* Icon of the Header
*/
@Prop() icon: string;
@Prop() icon?: string;

@Watch('icon')
onIconChange(icon: string) {
Expand All @@ -54,22 +54,24 @@ export class ModalHeader {
/**
* Icon color
*/
@Prop() iconColor: string;
@Prop() iconColor?: string;

/**
* Emits when close icon is clicked and closes the modal
* Can be prevented, in which case only the event is triggered, and the modal remains open
*/
@Event() closeClick: EventEmitter<MouseEvent>;
@Event() closeClick!: EventEmitter<MouseEvent>;

private parentDialog: HTMLIxModalElement;
private parentDialog!: HTMLIxModalElement;

componentDidLoad() {
this.parentDialog = closestPassShadow(
this.hostElement,
'ix-modal'
) as HTMLIxModalElement;
this.onIconChange(this.icon);
if (this.icon) {
this.onIconChange(this.icon!);
}
}

private onCloseClick(event: MouseEvent) {
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/tests/application/application.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ regressionTest.describe('application-switch', () => {
});

Object.keys(viewPorts).forEach((viewPort) => {
type ViewPortKey = keyof typeof viewPorts;
regressionTest(`MenuSidebar ${viewPort}`, async ({ page }) => {
await page.setViewportSize(viewPorts[viewPort]);
await page.setViewportSize(viewPorts[viewPort as ViewPortKey]);
await page.goto('application/application-switch');

const toggleMenuButton = page.locator('ix-menu-expand-icon').nth(0);
Expand Down

0 comments on commit cc9c40f

Please sign in to comment.