From 838ea9f16b14dd277324ec81621d5aa73758e762 Mon Sep 17 00:00:00 2001 From: marvin-j97 Date: Wed, 8 Jan 2025 22:44:22 +0100 Subject: [PATCH 1/2] solid/web: export ClassList type --- packages/solid/web/src/index.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/solid/web/src/index.ts b/packages/solid/web/src/index.ts index 4d279d8aa..c613682d0 100644 --- a/packages/solid/web/src/index.ts +++ b/packages/solid/web/src/index.ts @@ -58,11 +58,11 @@ export function Portal(pro useShadow?: T; isSVG?: S; ref?: - | (S extends true ? SVGGElement : HTMLDivElement) - | (( - el: (T extends true ? { readonly shadowRoot: ShadowRoot } : {}) & - (S extends true ? SVGGElement : HTMLDivElement) - ) => void); + | (S extends true ? SVGGElement : HTMLDivElement) + | (( + el: (T extends true ? { readonly shadowRoot: ShadowRoot } : {}) & + (S extends true ? SVGGElement : HTMLDivElement) + ) => void); children: JSX.Element; }) { const { useShadow } = props, @@ -114,6 +114,10 @@ export type DynamicProps> = { component: T | undefined; }; +export type ClassList = { + [k: string]: boolean | undefined; +}; + /** * Renders an arbitrary custom or native component and passes the other props * ```typescript From 600cb57e25182b1c87498edc6bf03c6e824f5e4d Mon Sep 17 00:00:00 2001 From: marvin-j97 Date: Wed, 8 Jan 2025 22:44:57 +0100 Subject: [PATCH 2/2] fix formatting --- packages/solid/web/src/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/solid/web/src/index.ts b/packages/solid/web/src/index.ts index c613682d0..dc27eaba8 100644 --- a/packages/solid/web/src/index.ts +++ b/packages/solid/web/src/index.ts @@ -58,11 +58,11 @@ export function Portal(pro useShadow?: T; isSVG?: S; ref?: - | (S extends true ? SVGGElement : HTMLDivElement) - | (( - el: (T extends true ? { readonly shadowRoot: ShadowRoot } : {}) & - (S extends true ? SVGGElement : HTMLDivElement) - ) => void); + | (S extends true ? SVGGElement : HTMLDivElement) + | (( + el: (T extends true ? { readonly shadowRoot: ShadowRoot } : {}) & + (S extends true ? SVGGElement : HTMLDivElement) + ) => void); children: JSX.Element; }) { const { useShadow } = props,