@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
17 lines • 1.27 kB
TypeScript
import { EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
type paletteSelection = Exclude<keyof EmotionCanvasTheme['canvas']['palette'], 'common'>;
interface BackgroundColors {
normal?: string;
hover?: string;
contrast?: string;
}
/**
* @deprecated ⚠️ `getPaletteColors` is deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
*/
export declare const getPaletteColors: (type: paletteSelection, theme: EmotionCanvasTheme) => BackgroundColors;
/**
* @deprecated ⚠️ `useThemedPalette` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
*/
export declare const useThemedPalette: (type: paletteSelection) => BackgroundColors;
export {};
//# sourceMappingURL=useThemedPalette.d.ts.map