-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathcommonProps.js
More file actions
32 lines (30 loc) · 863 Bytes
/
commonProps.js
File metadata and controls
32 lines (30 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import PropTypes from 'prop-types';
import simpleLayout from '../layouts/simple';
import * as simpleEnterExit from '../enter-exit-styles/simple';
export const commonPropTypes = {
columns: PropTypes.number.isRequired,
columnWidth: PropTypes.number.isRequired,
gutterWidth: PropTypes.number,
gutterHeight: PropTypes.number,
component: PropTypes.string,
layout: PropTypes.func,
sorted: PropTypes.bool,
enter: PropTypes.func,
entered: PropTypes.func,
exit: PropTypes.func,
perspective: PropTypes.number,
lengthUnit: PropTypes.string,
angleUnit: PropTypes.string
};
export const commonDefaultProps = {
lengthUnit: 'px',
angleUnit: 'deg',
component: 'div',
gutterWidth: 0,
gutterHeight: 0,
layout: simpleLayout,
sorted: false,
enter: simpleEnterExit.enter,
entered: simpleEnterExit.entered,
exit: simpleEnterExit.exit
};