UNPKG

799 BJavaScriptView Raw
1// Deprecated: Moved to `react-time-ago`.
2import { oneOfType, arrayOf, string, number, shape, func } from 'prop-types'; // The first step isn't required to define `minTime` or `test()`.
3
4var step = oneOfType([shape({
5 minTime: number,
6 formatAs: string.isRequired
7}), shape({
8 test: func,
9 formatAs: string.isRequired
10}), shape({
11 minTime: number,
12 format: func.isRequired
13}), shape({
14 test: func,
15 format: func.isRequired
16})]); // Formatting style.
17
18export var style = oneOfType([// Not using `oneOf()` here, because that way
19// this package wouldn't support some hypothetical
20// new styles added to `javascript-time-ago` in some future.
21string, shape({
22 steps: arrayOf(step).isRequired,
23 labels: oneOfType([string, arrayOf(string)]).isRequired
24})]);
25//# sourceMappingURL=PropTypes.js.map
\No newline at end of file