Skip to content
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

Align the usage with TailwindCSS #8

Closed
hyf0 opened this issue Sep 2, 2022 · 3 comments
Closed

Align the usage with TailwindCSS #8

hyf0 opened this issue Sep 2, 2022 · 3 comments

Comments

@hyf0
Copy link

hyf0 commented Sep 2, 2022

Great project!
IMO, I think aligning the usage with TailwindCSS would provide better DX for anyone who wants to use this project.

@arlyon
Copy link
Owner

arlyon commented Sep 2, 2022

Hi. I appreciate you opening an issue but I'm not sure I understand what you mean? Are you asking that this project be managed by tailwind directly rather than be a third party plugin?

@hyf0
Copy link
Author

hyf0 commented Sep 5, 2022

Usage of stailwc

export const ColorButton = () => {
  const [clicked, setClicked] = useState(0);
  return (
    <button
      tw="p-1 m-4 text-green bg-white hover:(bg-gray text-yellow md:text-red) border-3"
      onClick={() => setClicked(clicked + 1)}
    >
      Clicked {clicked} times
    </button>
  );
};

Usage of tailwind

export const ColorButton = () => {
  const [clicked, setClicked] = useState(0);
  return (
    <button
      className="p-1 m-4 text-green bg-white hover:(bg-gray text-yellow md:text-red) border-3"
      onClick={() => setClicked(clicked + 1)}
    >
      Clicked {clicked} times
    </button>
  );
};

@arlyon
Copy link
Owner

arlyon commented Sep 6, 2022

Ah I see. I plan on adding additional features to stailwc including directive suggestion when you mistype or otherwise include an invalid tailwind class which would not be compatible with this approach. Closing.

@arlyon arlyon closed this as completed Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants