- 
                Notifications
    You must be signed in to change notification settings 
- Fork 148
Open
Labels
PKG: styled kitRelated to the styled kitRelated to the styled kitTYPE: bugSomething isn't workingSomething isn't working
Description
Which package is affected?
Headless Kit
Describe the bug
This means that the css-tree code (~60kb) will go into one bundle and will be shipped to the client.
 
Reproduction
π ββοΈ
Steps to reproduce
create new empty qwik project
init qwik-ui
add button component
Consume it in main route with:
export default component$(() => {
  const switchSig = useSignal(false);
  return (
    <>
      <h1>Hi π</h1>
      <div>
        Can't wait to see what you build with qwik!
        <br />
        Happy coding.
      </div>
      <div>
        <Button size="sm" onClick$={() => (switchSig.value = !switchSig.value)}>
          Click Me
        </Button>
        {isBrowser && (
          <div class={cn(switchSig.value ? "bg-red-500" : "bg-blue-500")}>
            Browser
          </div>
        )}
      </div>
    </>
  );
});System Info
π
ββοΈAdditional Information
Two ideas to fix it:
- move the theme helpers into a separate nx package
- remove the cn() helper altogether with the use of @layer
Metadata
Metadata
Assignees
Labels
PKG: styled kitRelated to the styled kitRelated to the styled kitTYPE: bugSomething isn't workingSomething isn't working
Type
Projects
Status
Upcoming