Skip to content

Commit c47309c

Browse files
committed
Add meta and formGroup propTypes
1 parent c144501 commit c47309c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
11
import PropTypes from 'prop-types';
22

33
export const optionsPropType = PropTypes.arrayOf(PropTypes.shape({ label: PropTypes.string.isRequired, value: PropTypes.any }));
4+
5+
export const meta = PropTypes.shape({
6+
active: PropTypes.bool,
7+
dirty: PropTypes.bool,
8+
dirtySinceLastSubmit: PropTypes.bool,
9+
error: PropTypes.any,
10+
initial: PropTypes.any,
11+
invalid: PropTypes.bool,
12+
modified: PropTypes.bool,
13+
pristine: PropTypes.bool,
14+
submitError: PropTypes.any,
15+
submitFailed: PropTypes.bool,
16+
submitSucceeded: PropTypes.bool,
17+
submitting: PropTypes.bool,
18+
touched: PropTypes.bool,
19+
valid: PropTypes.bool,
20+
validating: PropTypes.bool,
21+
visited: PropTypes.bool,
22+
});
23+
24+
export const formGroup = {
25+
isRequired: PropTypes.bool,
26+
label: PropTypes.node,
27+
helperText: PropTypes.node,
28+
meta,
29+
description: PropTypes.node,
30+
};

0 commit comments

Comments
 (0)