Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

default-props

v2.6.5arrow_drop_down
v2.11.1
v2.6.5
v2.5.5
STATUS
Passing
DOWNLOADS
12,718
LICENSE
Apache 2.0
VISIBILITY
Public
PUBLISHED
A year ago
SIZE
23 KB
2 contributors
Install default-props as a package?
Copied
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
default-props.js
10 Lines(8 sloc)
1
2
3
4
5
6
7
8
9
10
11
import { deepMerge } from './utils';
import { base } from './themes/base';

export const defaultProps = {
  theme: base,
};

export const extendDefaultTheme = theme => {
  defaultProps.theme = deepMerge(base, theme);
};