-
-
Notifications
You must be signed in to change notification settings - Fork 286
Closed
Description
Description
Supporting multiple JSX frameworks at the same time can be useful in cases like Astro.
Problem Statement/Justification
I have a component written in React and another in Solid, displayed on the same page using Astro.
I would still like to use Panda JSX components in both Frameworks.
Right now it's only easily possible to have the JSX components work for eighter react or solid, not both at the same time.
Proposed Solution or API
allow the jsxFramework config option to accept arrays aswell
export default defineConfig({
// [...]
jsxFramework: ["react", "solid"]
})then generate folder structure like so:
styled-system/react-jsx
styled-system/solid-jsx
usage would then look like this:
// solid
import { Box } from "../styled-system/solid-jsx"
export default function Solid() {
return <Box bg="green">Hello from Solid</Box>
}// react
import { Box } from '../styled-system/react-jsx'
const React: React.FC = () => {
return <Box bg="blue">Hello from React</Box>
}
export default ReactAlternatives
No response
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels