1 | import { warn } from './warn';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export function warnMutuallyExclusive(componentName, props, exclusiveMap) {
|
11 | if (process.env.NODE_ENV !== 'production') {
|
12 | for (var propName in exclusiveMap) {
|
13 | if (props && props[propName] !== undefined) {
|
14 | var propInExclusiveMapValue = exclusiveMap[propName];
|
15 | if (propInExclusiveMapValue && props[propInExclusiveMapValue] !== undefined) {
|
16 | warn(componentName + " property '" + propName + "' is mutually exclusive with '" + exclusiveMap[propName] + "'. " +
|
17 | "Use one or the other.");
|
18 | }
|
19 | }
|
20 | }
|
21 | }
|
22 | }
|
23 |
|
\ | No newline at end of file |