We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What version of prettier-plugin-tailwindcss are you using?
prettier-plugin-tailwindcss
For example: v0.5.3
What version of Tailwind CSS are you using?
For example: v3.4.1
What version of Node.js are you using?
For example: v18.0.0
What package manager are you using?
For example: pnpm
What operating system are you using?
For example: Linux
Reproduction URL
.prettierrc.js
module.exports = { plugins: [require('prettier-plugin-tailwindcss')], tailwindFunctions: ['tw'] };
Example.tsx
const Btn1 = tw(Button)`border p-1 bg-pink-100`; const Btn2 = tw(Button).attrs({ size: 'small', })`border p-1 bg-pink-100`; const Btn3 = tw(Button)<React.ComponentProps<typeof Button>>`border p-1 bg-pink-100`;
Describe your issue
Both twin.macro and react-twc allows styling an existing component using the above syntax.
Prettier plugin is not sorting the classes in those syntax usages.
The text was updated successfully, but these errors were encountered:
Also, the following doesn't seem to work too:
const Box1 = tw.div.attrs({ onClick: () => console.log('clicked'), })`border p-1 border-red-600 bg-slate-100`; const Anchor = tw.a.attrs<AnchorProps>((props) => {})`p-1 border-2 border-blue-500 bg-white`;
Sorry, something went wrong.
No branches or pull requests
What version of
prettier-plugin-tailwindcss
are you using?For example: v0.5.3
What version of Tailwind CSS are you using?
For example: v3.4.1
What version of Node.js are you using?
For example: v18.0.0
What package manager are you using?
For example: pnpm
What operating system are you using?
For example: Linux
Reproduction URL
.prettierrc.js
Example.tsx
Describe your issue
Both twin.macro and react-twc allows styling an existing component using the above syntax.
Prettier plugin is not sorting the classes in those syntax usages.
The text was updated successfully, but these errors were encountered: