-
Describe the bugSo I am trying to setup shadcn in a components package in my monorepo. This components package has been created with I then re-exported this tooltip from the packages `index.ts export * as Tooltip from './components/ui/tooltip/index.js'; and ran the pnpm package command. When I try to use the tooltip like so: <script lang="ts">
import { Tooltip } from '@podsuite/components';
import type { Snippet } from 'svelte';
interface Props {
title: string;
children?: Snippet;
}
let { title, children }: Props = $props();
</script>
<Tooltip.Provider delayDuration={200}>
<Tooltip.Root>
<Tooltip.Trigger>{@render children?.()}</Tooltip.Trigger>
<Tooltip.Content
class="hidden lg:flex max-w-[10rem] items-center justify-center hyphens-auto break-words"
>
<p class="text-center">{title}</p>
</Tooltip.Content>
</Tooltip.Root>
</Tooltip.Provider> the component doesn't get rendered and doesn't even appear in the Dom. Reproduction. LogsNo response System InfoSystem:
OS: Windows 10 10.0.19045
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 13.25 GB / 31.93 GB
Binaries:
Node: 20.15.0 - C:\Program Files\nodejs\node.EXE
npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.4.0 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
Edge: Chromium (130.0.2849.68)
Internet Explorer: 11.0.19041.4355 Severityblocking an upgrade |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Did you setup your tailwind config so that your internal component library's css is included? |
Beta Was this translation helpful? Give feedback.
-
I am not sure, I basically just followed the instructions. Do you mean the |
Beta Was this translation helpful? Give feedback.
-
I believe you need to setup the content. |
Beta Was this translation helpful? Give feedback.
-
Yes the shadcn cli set up a |
Beta Was this translation helpful? Give feedback.
-
I think you need to setup your content in the project consuming your ui library to point to the ui library |
Beta Was this translation helpful? Give feedback.
-
So if your structure is
You need to setup the tailwind.config.ts to parse all the svelte html and ts files in ui. |
Beta Was this translation helpful? Give feedback.
So if your structure is
You need to setup the tailwind.config.ts to parse all the svelte html and ts files in ui.