You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 789f31a
Browse filesBrowse the repository at this point in the historyBrowse files
Bill Leoutsakos
authored and
Bill Leoutsakos
committed
fix static CVA config and compound condition extraction
write('packages/emcn/src/index.ts',"export {recipe} from './components/recipe'")
555
+
constsource=(config: string,after: boolean)=>
556
+
`import {cva} from 'class-variance-authority';${after ? declarations.replace('bg-red-500','bg-blue-500').replace("['small']","['large']").replace('=external','=other') : declarations}export const recipe=cva('p-2',${config.replace('{compoundVariants:',"{variants:{size:{small:'',large:''}},compoundVariants:")});throw new Error('Source must not execute')`
557
+
write(sourceFile,source(beforeConfig,false))
558
+
write(
559
+
ui,
560
+
"import {recipe} from '@sim/emcn';const A=()=> <div className={recipe({size:'small'})}/>"
0 commit comments