Skip to content

Not working with Solid. Example in documentation for Solid also not working. #73

@rendomnet

Description

@rendomnet

https://macaron.js.org/docs/examples/solid
not working

And in my own code when I add the macaron code to my component, this error starts to happen.
"default" is not exported by ".../IconButton.tsx"

but I have export default IconButton;

import { createSignal } from 'solid-js';
import { styled } from '@macaron-css/solid';

const StyledDiv = styled('div', {
  base: {
    padding: '10px',
    background: '#eee',
  },
});

const IconButton = () => {
  const [count, setCount] = createSignal(0);

  return <StyledDiv onClick={() => setCount((c) => c + 1)}>test {count()}</StyledDiv>;
};

export default IconButton;

if I comment out the macaron stuff and use div as wrapper then error disappears.

solid-js": "^1.9.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions