UNPKG

tailwind-joy

Version:

React component library that styles the components of Joy UI in the Tailwind CSS way.

47 lines (46 loc) 1.62 kB
type BaseToken = '' | `joy-${string}` | `joy-${string} dark:joy-${string}`; /** * Adds a prefix to each piece of a space-separated string. * * This is useful when you need to write multiple class names with prefix. * * For example, `sm:gap-16 sm:px-12 sm:py-16` can be written as `addPrefix('gap-16 px-12 py-16', 'sm:')`. */ export declare function addPrefix(classNameOrToken: string, prefix: `${string}:`): string; /** * A shortcut for the `addPrefix` function. */ export declare function hover(classNameOrToken: string): string; /** * A shortcut for the `addPrefix` function. */ export declare function focus(classNameOrToken: string): string; /** * A shortcut for the `addPrefix` function. */ export declare function active(classNameOrToken: string): string; /** * A shortcut for the `addPrefix` function. */ export declare function disabled(classNameOrToken: string): string; /** * Converts a color token string into a valid Tailwind CSS class name. */ export declare function toColorClass(token: BaseToken, prefix: `${string}-`): string; /** * A shortcut for the `toColorClass` function. */ export declare function backgroundColor(token: BaseToken): string; /** * A shortcut for the `toColorClass` function. */ export declare function borderColor(token: BaseToken): string; /** * A shortcut for the `toColorClass` function. */ export declare function textColor(token: BaseToken): string; /** * Converts a color token string into a class name that specifies the value of a CSS variable. */ export declare function toVariableClass(token: BaseToken, variableName: string): string; export {};