-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathindex.d.ts
43 lines (33 loc) · 1.45 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { CSSProperties } from "react";
import { Config } from "tailwindcss";
export interface TailwindConfig {
important?: Config["important"];
prefix?: Config["prefix"];
separator?: Config["separator"];
safelist?: Config["safelist"];
presets?: Config["presets"];
future?: Config["future"];
experimental?: Config["experimental"];
darkMode?: Config["darkMode"];
theme?: Config["theme"];
corePlugins?: Config["corePlugins"];
plugins?: Config["plugins"];
}
type Content = string | Record<string, boolean> | TemplateStringsArray | Content[];
type Options = { merge?: boolean; minify?: boolean; ignoreMediaQueries?: boolean };
export function getCSS(content: string, config?: TailwindConfig): string;
export function tailwindToCSS(params: { config?: TailwindConfig; options?: Options }): {
twi: typeof twi;
twj: typeof twj;
};
export function classListFormatter(content: Content, options?: Options): string;
export function classListFormatter(...content: Content[]): string;
export function twi(content: Content, options?: Options): string;
export function twi(...content: Content[]): string;
export function twj(content: Content, options?: Options): CSSProperties;
export function twj(...content: Content[]): CSSProperties;
export function tailwindInlineCSS(config?: TailwindConfig, options?: Options): typeof twi;
export function tailwindInlineJson(
config?: TailwindConfig,
options?: Omit<Options, "minify" | "ignoreMediaQueries">
): typeof twj;