New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: twind/styled #7
Conversation
474a81a
to
53c2c66
Compare
ea6b5ea
to
5cb5b4c
Compare
5e1c698
to
37fdf8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all LGTM. The only comment I have is around the linting errors people who use styled already are going to recieve when using styled.xxx`` but I guess if we made tw.xxx`` available that might get confusing.
I don't think it's something that should prevent this from being merged but something we should think about.
|
After looking at and playing with the awesome demo in #44 I realised that it is possible to just do: import { styled as twind } from "twind/styled/react";
const Button = twind.button`...`Which prevents the styled linter plugin on codesandbox from erroring. Perhaps we recommend something like this. |
|
That is a good idea 💡. I'll try to look through the comment to see if wee can implement some of the other ideas. |
Pull Request Test Coverage Report for Build 473256276
💛 - Coveralls |
Pull Request Test Coverage Report for Build 473326666
💛 - Coveralls |
d3d2fb6
to
a63ed92
Compare
|
We will focus our efforts on a new PR once #102 is agreed on. |
The styled API is commonly used within the react community. Although twind is framework agnostic it may be nice to provide a styled module as well.
The API is inspired by emotion, styled-component and goober. This PR adds three new modules:
See docs/styled.md
An example is available as example/styled.tsx. After
yarn startopen http://localhost:8080/styled.html.Try the Preview Package
This PR has been published to npm.pkg.github.com as
@tw-in-js/twind@pr7.Install/Update
Configure your NPM client (click to expand)
Adjust you
.npmrcto usehttps://npm.pkg.github.comfor@tw-in-jsUsing the command line:
npm config set @tw-in-js:registry https://npm.pkg.github.com --globalBenchmarks