Rezact / Rezact

A JavaScript Framework/Library (call it what you want) that blends the best of svelte, solid, react, and many others.

Home Page:https://rezact.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FEAT: Styled-Components Compatibility

zachlankton opened this issue · comments

Support Styled-Components Library for Rezact

took a quick look and the styled components library returns a react component from its output

const Button = styled.button`
  background: transparent;
  border-radius: 3px;
  border: 2px solid #BF4F74;
  color: #BF4F74;
  margin: 0 1em;
  padding: 0.25em 1em;
`
console.log(Button)

shows:

image


Wondering if there is a way we can create a wrapper that takes in a styled-component and returns an element/component that is compatible with Rezact???

Ideal Interface Idea:

-const Button = styled.button`
+const Button = rz(styled.button`
  background: transparent;
  border-radius: 3px;
  border: 2px solid #BF4F74;
  color: #BF4F74;
  margin: 0 1em;
  padding: 0.25em 1em;
+`)
-`