diff --git a/src/use-tailwind.web.ts b/src/use-tailwind.web.ts index f7336c3..53a901e 100644 --- a/src/use-tailwind.web.ts +++ b/src/use-tailwind.web.ts @@ -22,7 +22,7 @@ export function useTailwind< ) => { return flatten ? classNameToInlineStyle(className, useTailwindOptions) - : { $$css: true, tailwindClassName: className }; + : { $$css: true, [className]: className }; }) as UseTailwindCallback

; } diff --git a/src/with-styled-props.ts b/src/with-styled-props.ts index 79a1a03..81f6144 100644 --- a/src/with-styled-props.ts +++ b/src/with-styled-props.ts @@ -40,12 +40,12 @@ export function withStyledProps({ if (typeof value === "string") { if (preview) { styledProps[prop] = undefined; - (mainStyles as unknown as Record)[prop] = ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + mainStyles[prop as any] = Object.values( tw(value, { flatten: false, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }) as any - ).tailwindClassName; + }) + )[1]; } else { const entries = Object.entries(tw(value, { flatten: true }));