Skip to content

Commit 2cb9985

Browse files
GregOnNetGregor Woiwode
authored and
Gregor Woiwode
committed
refactor(dialog): remove class-overrides
1 parent a18b204 commit 2cb9985

File tree

1 file changed

+2
-12
lines changed
  • packages/kit-headless/src/components/dialog

1 file changed

+2
-12
lines changed

packages/kit-headless/src/components/dialog/dialog.tsx

+2-12
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
Slot,
77
component$,
88
createContextId,
9-
useComputed$,
109
useContext,
1110
useContextProvider,
1211
useOn,
@@ -105,20 +104,11 @@ export const Trigger = component$(() => {
105104
);
106105
});
107106

108-
export type PortalProps = {
109-
type?: 'modal' | 'bottom-sheet' | 'side-nav';
110-
};
111-
112-
export const Portal = component$((props: PortalProps) => {
107+
export const Portal = component$(() => {
113108
const context = useContext(dialogContext);
114-
const classes = useComputed$(() => [props.type ?? 'modal']);
115109

116110
return (
117-
<dialog
118-
class={classes}
119-
ref={context.state.dialogRef}
120-
onClick$={context.closeOnDialogClick}
121-
>
111+
<dialog ref={context.state.dialogRef} onClick$={context.closeOnDialogClick}>
122112
<Slot />
123113
</dialog>
124114
);

0 commit comments

Comments
 (0)