Comments (2)
Another issue, I'm getting the following two errors when trying to use my custom colors:
tsserver 2345] [E] Argument of type '"bg-blue-default"' is not assignable to parameter of type 'TArgs'
tsserver 2345] [E] Argument of type '"bg-blue-lighter"' is not assignable to parameter of type 'TClasses'
code:
const blueButton = tw(
button,
"rounded-b-full",
"bg-blue-default",
hover("bg-blue-lighter"),
sm("rounded-b-none"),
sm("rounded-r-full")
);
related types:
export type TBackgrounds =
| TBackgroundAttachment
| TBackgroundColor
export type TClasses =
| TUtility
| TLayout
| TTypography
| TBackgrounds
export type TArgs<T extends TClasses> =
| T
| null
| undefined
| { [key in T]?: boolean }
| TTailwindString;
export type TPseudoClass<T extends TClasses = TClasses> = (
className: T
) => TTailwindString;
export const hover: TPseudoClass = (className) =>
("hover:" + className) as TTailwindString;
It looks like the file generated by running lib/cli.js
is not found by tsserver ?
from tailwindcss-classnames.
Another issue, I'm getting the following two errors when trying to use my custom colors:
tsserver 2345] [E] Argument of type '"bg-blue-default"' is not assignable to parameter of type 'TArgs'
tsserver 2345] [E] Argument of type '"bg-blue-lighter"' is not assignable to parameter of type 'TClasses'code:
const blueButton = tw( button, "rounded-b-full", "bg-blue-default", hover("bg-blue-lighter"), sm("rounded-b-none"), sm("rounded-r-full") );related types:
export type TBackgrounds = | TBackgroundAttachment | TBackgroundColor export type TClasses = | TUtility | TLayout | TTypography | TBackgrounds export type TArgs<T extends TClasses> = | T | null | undefined | { [key in T]?: boolean } | TTailwindString; export type TPseudoClass<T extends TClasses = TClasses> = ( className: T ) => TTailwindString; export const hover: TPseudoClass = (className) => ("hover:" + className) as TTailwindString;It looks like the file generated by running
lib/cli.js
is not found by tsserver ?
Are you importing from the npm package?
You should import from the generated file instead of the package.
from tailwindcss-classnames.
Related Issues (20)
- Move `vertical-align` values to config file instead of hard-coding HOT 1
- Build is missing negative value classnames HOT 2
- CLI error on version 3.0.0 HOT 3
- CI: npm publish is failing on the ci
- Remove colors.js or pin it to 1.4.0 HOT 1
- Missing color from TailwindCSS. HOT 5
- Missing support for stacking pseudo classes HOT 5
- Custom screen sizes in config file not working HOT 2
- Missing 'group' helper? HOT 3
- idea: function helpers or generics for stacked modifiers HOT 2
- No generated type for 'ring-inset'
- darkMode: 'class' in tailwind.config.js not supported
- Bundle size increased after version 3.0.1 HOT 1
- ClassnameGenerator indexing after filter when generating colors
- Negative value in classname and Outline offset.
- Config with Preset Fail to Generated with CLI HOT 1
- Try to merge similiar utility functions
- Container Queries
- Support v3.1.0
- Make using exactOptionalPropertyTypes TS option easier
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailwindcss-classnames.