Skip to content

Commit cb7a2a2

Browse files
authored
Merge pull request #235 from qwikerx/fix/234
feat: use twMerge in Floating component
2 parents e668cee + dfdb3f0 commit cb7a2a2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flowbite-qwik",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Official Qwik components built for Flowbite and Tailwind CSS",
55
"keywords": [
66
"design-system",

packages/lib/src/components/Floating/Floating.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { PropsOf, Signal, Slot, component$ } from '@builder.io/qwik'
2+
import {twMerge} from "tailwind-merge";
3+
import clsx from "clsx";
24

35
type RenderFloatingElementProps = PropsOf<'div'> & {
46
ref: Signal<HTMLDivElement | undefined>
@@ -9,11 +11,11 @@ export const RenderFloatingElement = component$<RenderFloatingElementProps>(({ r
911
return (
1012
<div
1113
ref={ref}
12-
class={[
14+
class={twMerge(
1315
'absolute z-10 inline-block transition-opacity duration-300',
1416
isVisible ? 'block opacity-100' : 'pointer-events-none hidden opacity-0',
15-
classList,
16-
]}
17+
clsx(classList),
18+
)}
1719
{...props}
1820
>
1921
<Slot />

0 commit comments

Comments
 (0)