UNPKG

@atlaskit/editor-common

Version:

A package that contains common classes and components for editor and renderer

14 lines 404 B
import { useThemeObserver } from '@atlaskit/tokens'; /** * Warning -- if additional color modes beyond light and dark are added in future -- this will have unexpected behaviour */ export const useIconThemed = () => { const { colorMode } = useThemeObserver(); return { iconThemed: colors => { return colorMode && colorMode === 'dark' ? colors['dark'] : colors['light']; } }; };