feat(clerk-js): Add cssLayerName option to experimental_createTheme#6344
Conversation
…mental_createTheme
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| import { experimental_createTheme } from '../createTheme'; | ||
|
|
||
| export const shadcn = experimental_createTheme({ | ||
| cssLayerName: 'components', |
There was a problem hiding this comment.
Since we know shadcn is using TW, we can specify the cssLayerName to be defined within components, relying on TW layer order specified.
| import { experimental_createTheme } from '../createTheme'; | ||
|
|
||
| export const shadcn = experimental_createTheme({ | ||
| cssLayerName: 'components', |
There was a problem hiding this comment.
| cssLayerName: 'components', | |
| cssLayerName: 'clerk-components', |
There was a problem hiding this comment.
We need this to be components as this is the layer name tailwind uses. Which removes the need for them to need to specify the layer order. We can only do this because we know if they are using shadcn, that TW is used and they have a components layer already defined.
f6cc7d0
into
alexcarpenter/user-2373-expose-shadcn-theme-from-clerkthemes
Description
This enables shipping the shadcn theme without the users needing to specify the
cssLayerNamethemselves.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change