UNPKG

react-howl

Version:
20 lines (17 loc) 548 B
import deepmerge from 'deepmerge'; /** * Extends and/or overrides the theme. * * @param {object} base - The theme that will be extended/overridden. * @param {object} extending - The extending theme that will extend/override the theme. * * @return {object} The extended/overridden theme. * * @example * const newTheme = extendTheme( * { primaryColor: 'red' }, * { primaryColor: 'blue', secondaryColor: 'green' }, * ); */ const extendTheme = (base, extending) => deepmerge(base, extending); export default extendTheme;