build: 支持 twin。
This commit is contained in:
18
types/twin.d.ts
vendored
Normal file
18
types/twin.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import 'twin.macro';
|
||||
import { css as cssImport } from '@emotion/react';
|
||||
import styledImport from '@emotion/styled';
|
||||
import { CSSInterpolation } from '@emotion/serialize';
|
||||
|
||||
declare module 'twin.macro' {
|
||||
// The styled and css imports
|
||||
const styled: typeof styledImport;
|
||||
const css: typeof cssImport;
|
||||
}
|
||||
|
||||
declare module 'react' {
|
||||
// The tw and css prop
|
||||
interface DOMAttributes<T> {
|
||||
tw?: string;
|
||||
css?: CSSInterpolation;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user