diff --git a/packages/components/src/components/drawer/shadow.tsx b/packages/components/src/components/drawer/shadow.tsx index 9c5453908b..5fedc32817 100644 --- a/packages/components/src/components/drawer/shadow.tsx +++ b/packages/components/src/components/drawer/shadow.tsx @@ -4,6 +4,7 @@ import { setState, validateLabel, validateOpen, validateAlign, validateModal } f import { Component, Host, Method, Prop, State, Watch, h } from '@stencil/core'; import type { JSX } from '@stencil/core'; +import clsx from 'clsx'; /** * @slot - The Content of drawer. @@ -55,10 +56,13 @@ export class KolDrawer implements DrawerAPI { return (
-
+
@@ -69,8 +73,13 @@ export class KolDrawer implements DrawerAPI { public render(): JSX.Element { const isModal = this.state._modal; return ( - (this.hostElement = el as HTMLElement)}> - + (this.hostElement = el as HTMLElement)} + > + {this.renderDialogContent()} diff --git a/packages/components/src/components/drawer/style.scss b/packages/components/src/components/drawer/style.scss index fce5a63908..0d76e08942 100644 --- a/packages/components/src/components/drawer/style.scss +++ b/packages/components/src/components/drawer/style.scss @@ -2,11 +2,9 @@ @import '../style'; @layer kol-component { - :host { + .kol-drawer { font-size: rem(16); - } - .drawer { &__dialog { padding: 0; border: none; diff --git a/packages/components/src/components/drawer/test/__snapshots__/snapshot.spec.tsx.snap b/packages/components/src/components/drawer/test/__snapshots__/snapshot.spec.tsx.snap index 82e9aed877..18d5cf0bd2 100644 --- a/packages/components/src/components/drawer/test/__snapshots__/snapshot.spec.tsx.snap +++ b/packages/components/src/components/drawer/test/__snapshots__/snapshot.spec.tsx.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`kol-drawer should render with _label="Label" _modal=false _open=false 1`] = ` - +