diff --git a/.storybook/stories/modal/nested-side-panel.stories.ts b/.storybook/stories/modal/side-panel-inline.stories.ts similarity index 92% rename from .storybook/stories/modal/nested-side-panel.stories.ts rename to .storybook/stories/modal/side-panel-inline.stories.ts index 5cc98508c3..9fc6f30c53 100644 --- a/.storybook/stories/modal/nested-side-panel.stories.ts +++ b/.storybook/stories/modal/side-panel-inline.stories.ts @@ -12,7 +12,7 @@ import { moduleMetadata, StoryFn, StoryObj } from '@storybook/angular'; import { CommonModules, removeFocusOutline } from '../../helpers/common'; export default { - title: 'Modal/Nested Side Panel', + title: 'Modal/Side Panel (inline)', decorators: [ moduleMetadata({ imports: [...CommonModules, ClrSidePanelModule], @@ -49,12 +49,12 @@ export default { }, }; -const NestedSidePanelTemplate: StoryFn = args => ({ +const InlineSidePanelTemplate: StoryFn = args => ({ template: `
- - -
+ + diff --git a/projects/angular/src/modal/modal.module.ts b/projects/angular/src/modal/modal.module.ts index 0746ecb2f8..6bb336aa0f 100644 --- a/projects/angular/src/modal/modal.module.ts +++ b/projects/angular/src/modal/modal.module.ts @@ -13,8 +13,9 @@ import { ClrIconModule } from '../icon/icon.module'; import { CdkTrapFocusModule } from '../utils/cdk/cdk-trap-focus.module'; import { ClrModal } from './modal'; import { ClrModalBody } from './modal-body'; +import { ClrModalHostDirective } from './modal-host.directive'; -export const CLR_MODAL_DIRECTIVES: Type[] = [ClrModal, ClrModalBody]; +export const CLR_MODAL_DIRECTIVES: Type[] = [ClrModal, ClrModalBody, ClrModalHostDirective]; @NgModule({ imports: [CommonModule, CdkTrapFocusModule, ClrIconModule], diff --git a/projects/angular/src/modal/modal.ts b/projects/angular/src/modal/modal.ts index 35d8f244b5..9c44d646b1 100644 --- a/projects/angular/src/modal/modal.ts +++ b/projects/angular/src/modal/modal.ts @@ -117,7 +117,7 @@ export class ClrModal implements OnChanges, OnDestroy { } private get hostElement(): HTMLElement { - return (this.elementRef.nativeElement as HTMLElement).closest('.modal-host') || document.body; + return (this.elementRef.nativeElement as HTMLElement).closest('.clr-modal-host') || document.body; } // Detect when _open is set to true and set no-scrolling to true diff --git a/projects/angular/src/modal/side-panel.module.ts b/projects/angular/src/modal/side-panel.module.ts index 7faab702de..689b8aca3d 100644 --- a/projects/angular/src/modal/side-panel.module.ts +++ b/projects/angular/src/modal/side-panel.module.ts @@ -18,6 +18,6 @@ export const CLR_SIDEPANEL_DIRECTIVES: Type[] = [ClrSidePanel]; @NgModule({ imports: [CommonModule, CdkTrapFocusModule, ClrIconModule, ClrModalModule], declarations: [CLR_SIDEPANEL_DIRECTIVES], - exports: [CLR_SIDEPANEL_DIRECTIVES, ClrIconModule], + exports: [CLR_SIDEPANEL_DIRECTIVES, ClrModalModule, ClrIconModule], }) export class ClrSidePanelModule {}