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, {}),
})
}
export const themed = key => props =>
css(get(props.theme, `styles.${key}`))(props.theme)
const applyColorMode = (theme, mode) => {
if (!mode) return theme
const modes = get(theme, 'colors.modes', {})
return merge.all({}, theme, {
colors: get(modes, mode, {}),
})
}
return theme => {
const styles = css(props.sx)(theme)
const raw = typeof props.css === 'function' ? props.css(theme) : props.css
return [styles, raw]
}
}