Skip to content

Commit

Permalink
[NO JIRA]: Fix incorrect custom prop type in calendar (Skyscanner#2308)
Browse files Browse the repository at this point in the history
  • Loading branch information
olliecurtis authored Dec 9, 2021
1 parent ce955d6 commit 4fc607a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
- bpk-component-badge:
- Fixed a misalignment of height of the badge when an icon variant is being used.

- bpk-component-calendar:
- Fixed an issue with custom `SelectionConfiguration` prop type where `type` was not correctly typed and threw a console error.

**Added:**
- bpk-component-textarea:
- Add new property `large` (optional) in textarea component with larger default height.
- Add new property `large` (optional) in textarea component with larger default height.

4 changes: 2 additions & 2 deletions packages/bpk-component-calendar/src/custom-proptypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ const CALENDAR_SELECTION_TYPE = {
};

const SelectionConfigurationSingle = PropTypes.shape({
type: CALENDAR_SELECTION_TYPE.single,
type: PropTypes.oneOf([CALENDAR_SELECTION_TYPE.single]),
date: PropTypes.instanceOf(Date),
});

const SelectionConfigurationRange = PropTypes.shape({
type: CALENDAR_SELECTION_TYPE.range,
type: PropTypes.oneOf([CALENDAR_SELECTION_TYPE.range]),
startDate: DateType('selectionConfiguration'),
endDate: DateType('selectionConfiguration'),
});
Expand Down

0 comments on commit 4fc607a

Please sign in to comment.