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
Type of issue: potential bug in type definition file
Current behavior:
Expected behavior: No type errors
Solution that I've found: In the type definition file, if you change the args type (Arg[] to Arg), the type error is fixed.
args
Arg[]
Arg
Current Type Definition file:
interface DynamicStyleFunction { (...args: Arg[]): DynamicStyle[]; }
After my fix:
interface DynamicStyleFunction { (...args: Arg): DynamicStyle[]; }
To reproduce:
const mq = facepaint([ '@media(max-width: 767px)', '@media(min-width: 768px)', ]) const Background = styled.div<{ src: string }>` ${({ src }) => mq({ background: [null, null, `url(${src}) no-repeat`], backgroundSize: [null, null, '100% 100%'], filter: [null, null, 'blur(10px)'], }) }`
Environment information: react v16.12.0 @emotion/core v10.0.27 @emotion/styled v10.0.27 facepaint v1.2.1 @types/facepaint v1.2.1
react
@emotion/core
@emotion/styled
facepaint
@types/facepaint
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Type of issue:
potential bug in type definition file
Current behavior:
Expected behavior:
No type errors
Solution that I've found:
In the type definition file, if you change the
args
type (Arg[]
toArg
), the type error is fixed.Current Type Definition file:
After my fix:
To reproduce:
Environment information:
react
v16.12.0@emotion/core
v10.0.27@emotion/styled
v10.0.27facepaint
v1.2.1@types/facepaint
v1.2.1The text was updated successfully, but these errors were encountered: