Skip to content

Commit

Permalink
Fix invalid propTypes defined in AmPm and Input
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Aug 13, 2021
1 parent 7360c5d commit 1ae24d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/TimeInput/AmPm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import mergeClassNames from 'merge-class-names';
import { getHours } from '@wojtekmaj/date-utils';

import { convert24to12 } from '../shared/dates';
import { isTime } from '../shared/propTypes';
import { isRef, isTime } from '../shared/propTypes';
import { getAmPmLabels } from '../shared/utils';

export default function AmPm({
Expand Down Expand Up @@ -58,7 +58,7 @@ AmPm.propTypes = {
ariaLabel: PropTypes.string,
className: PropTypes.string.isRequired,
disabled: PropTypes.bool,
inputRef: PropTypes.func,
inputRef: isRef,
locale: PropTypes.string,
maxTime: isTime,
minTime: isTime,
Expand Down
4 changes: 3 additions & 1 deletion src/TimeInput/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import mergeClassNames from 'merge-class-names';
import mergeRefs from 'merge-refs';
import updateInputWidth, { getFontShorthand } from 'update-input-width';

import { isRef } from '../shared/propTypes';

/* eslint-disable jsx-a11y/no-autofocus */

const isEdgeLegacy = (
Expand Down Expand Up @@ -145,7 +147,7 @@ Input.propTypes = {
autoFocus: PropTypes.bool,
className: PropTypes.string.isRequired,
disabled: PropTypes.bool,
inputRef: PropTypes.func,
inputRef: isRef,
max: PropTypes.number,
min: PropTypes.number,
name: PropTypes.string,
Expand Down

0 comments on commit 1ae24d9

Please sign in to comment.