mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
add types for styled-jsx
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// Type definitions for styled-jsx 2.2.1
|
||||
// Project: https://github.com/zeit/styled-jsx
|
||||
// Definitions by: R1ZZU <https://github.com/R1ZZU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
declare module 'react' {
|
||||
interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
|
||||
jsx?: boolean;
|
||||
global?: boolean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
const styled = (
|
||||
<div>
|
||||
<style jsx>{`
|
||||
color: rebeccapurple;
|
||||
`}</style>
|
||||
</div>
|
||||
);
|
||||
|
||||
const styledGlobal = (
|
||||
<div>
|
||||
<style jsx global>{`
|
||||
color: rebeccapurple;
|
||||
`}</style>
|
||||
</div>
|
||||
);
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"styled-jsx-tests.tsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user