use-material-you
Version:
React hook to create dynamic schemes and variants based on M3/material-color-utilities
46 lines (41 loc) • 1.41 kB
TypeScript
export declare type ContrastLevelType = "default" | "medium" | "high" | "reduced";
export declare interface SimpleDynamicScheme {
primary: string;
onPrimary: string;
primaryContainer: string;
onPrimaryContainer: string;
secondary: string;
onSecondary: string;
secondaryContainer: string;
onSecondaryContainer: string;
tertiary: string;
onTertiary: string;
tertiaryContainer: string;
onTertiaryContainer: string;
error: string;
onError: string;
errorContainer: string;
onErrorContainer: string;
background: string;
onBackground: string;
surface: string;
onSurface: string;
surfaceVariant: string;
onSurfaceVariant: string;
outline: string;
outlineVariant: string;
shadow: string;
scrim: string;
inverseSurface: string;
inverseOnSurface: string;
inversePrimary: string;
}
export declare function useMaterialYou(source: string | number, // hex, rgba or http
options: {
variant?: VariantType;
contrastLevel?: ContrastLevelType;
isDark?: boolean;
crossOrigin?: string;
}): readonly [SimpleDynamicScheme | null, "" | "error" | "loading" | "done"];
export declare type VariantType = "monochrome" | "neutral" | "tonal_spot" | "vibrant" | "expressive" | "fidelity" | "content" | "rainbow" | "fruit_salad" | "image_fidelity";
export { }