Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const applyColorMode = (theme, mode) => {
if (!mode) return theme
const modes = get(theme, 'colors.modes', {})
return merge.all({}, theme, {
colors: get(modes, mode, {}),
})
}