@guruhotel/aura-ui
Version:
⚛️ React UI library by GuruHotel
55 lines (54 loc) • 1.52 kB
TypeScript
import { ThemeType, TokenValue, TokenKeyName } from "./types";
export declare const getTokenValue: (token: TokenKeyName, tokenName: string, alpha?: number) => string;
export declare const getDocumentCSSTokens: () => {
colors: {
[x: string]: TokenValue | undefined;
};
fonts: {
[x: string]: TokenValue | undefined;
};
fontSizes: {
[x: string]: TokenValue | undefined;
};
fontWeigths: {
[x: string]: TokenValue | undefined;
};
letterSpacings: {
[x: string]: TokenValue | undefined;
};
space: {
[x: string]: TokenValue | undefined;
};
sizes: {
[x: string]: TokenValue | undefined;
};
radii: {
[x: string]: TokenValue | undefined;
};
zIndices: {
[x: string]: TokenValue | undefined;
};
borderWeights: {
[x: string]: TokenValue | undefined;
};
shadows: {
[x: string]: TokenValue | undefined;
};
transitions: {
[x: string]: TokenValue | undefined;
};
breakpoints: {
[x: string]: TokenValue | undefined;
};
};
/**
* Returns active theme according to the given document
*/
export declare const getDocumentTheme: (el: HTMLElement) => string;
export declare const getThemeName: (theme: ThemeType | string) => string;
export declare const changeTheme: (theme: ThemeType | string) => void;
export declare type SSRState = {
isBrowser: boolean;
isServer: boolean;
};
export declare const useSSR: () => SSRState;