Skip to content

Commit 7e42a8b

Browse files
jeff-phillips-18priley86
authored andcommitted
feat(helpers): Add exported helpers object containing all helper functions. (#842)
This is preparation for the ability of extensions and console to pull in portions of patternfly-react and allow tree shaking.
1 parent 1cdf3aa commit 7e42a8b

File tree

1 file changed

+28
-0
lines changed
  • packages/patternfly-3/patternfly-react/src/common

1 file changed

+28
-0
lines changed

packages/patternfly-3/patternfly-react/src/common/helpers.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import React from 'react';
2+
import { default as Timer } from './Timer';
3+
import { closest as closestPolyfill } from './closestPolyfill';
4+
import { default as controlled } from './controlled';
5+
import { patternfly, c3ChartDefaults, layout } from './patternfly';
26

37
/** Equivalent to calling `this.someMethod = this.someMethod.bind(this)` for every method name in the methods array. */
48
export const bindMethods = (context, methods) => {
@@ -90,3 +94,27 @@ export const KEYS = {
9094
HOME: 'Home',
9195
END: 'End'
9296
};
97+
98+
export const helpers = {
99+
Timer,
100+
closestPolyfill,
101+
controlled,
102+
patternfly,
103+
c3ChartDefaults,
104+
layout,
105+
debounce,
106+
propExists,
107+
propOrState,
108+
selectKeys,
109+
filterKeys,
110+
excludeKeys,
111+
childrenToArray,
112+
filterChildren,
113+
findChild,
114+
propsChanged,
115+
hasDisplayName,
116+
nullValues,
117+
noop,
118+
KEY_CODES,
119+
KEYS
120+
};

0 commit comments

Comments
 (0)