GitXplorerGitXplorer
n

tw-to-stylex

public
88 stars
3 forks
0 issues

Commits

List of commits on branch main.
Unverified
55f9db96a9f4e2b510f4caeb941c8dd5d3ed8e62

properties until border-radius typed

nnmn committed 2 months ago
Unverified
f255ec17df7f87bddfff2d129d30880ebb7cfd3b

parser in types for type-safe tw()

nnmn committed 2 months ago
Unverified
bacd16e673a3a12fe5d38d542853082bde8ce663

Upgrade to Tailwind 4

nnmn committed 2 months ago
Verified
e06f0356fc24d34090e73081dd53ec0c700ac7c4

Merge pull request #1 from alitnk/patch-1

nnmn committed 7 months ago
Verified
94d93f8eb3e1b231f0f9e6358b3948e68548149f

Update package.json

aalitnk committed 7 months ago
Unverified
1438ed6644387be7081d5e23f90778b76b7a636d

feat: Convert tw() calls to stylex styles anywhere

nnmn committed a year ago

README

The README file for this repository.

tw-to-stylex

A simpler code translator to convert code using Tailwind to code using StyleX

TODO

  • [x] className={cn("m-1 text-red-500", prop.className)}

    • should become {..._stylex.props(styles.$1, prop.className)}
    • but is currently: {..._stylex.props(styles.$1)}
  • [x] There might multiple stylex imports, but it should be fine.

  • [x] It'll insert a second stylex.create call even when one exists

  • [-] Support this pattern: <div className={cn(hidden lg:inline-flex text-[${tokens.textColor}])} />

  • [ ] Add and use a custom tw function to behave like stylex.atom().

  • [ ] A Babel plugin for style:x={} instead of a spread