Skip to content

Commit

Permalink
Allow React elements as button labels (#2124)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertCarreras committed May 5, 2020
1 parent b21bf47 commit c4bdd55
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Expand Up @@ -79,8 +79,8 @@
| `popperPlacement` | `enumpopperPlacementPositions` | | |
| `popperProps` | `object` | | |
| `preventOpenOnFocus` | `bool` | `false` | |
| `previousMonthButtonLabel` | `string` | `"Previous Month"` | |
| `previousYearButtonLabel` | `string` | `"Previous Year"` | |
| `previousMonthButtonLabel` | `union(string\|node)` | `"Previous Month"` | |
| `previousYearButtonLabel` | `union(string\|node)` | `"Previous Year"` | |
| `readOnly` | `bool` | `false` | |
| `renderCustomHeader` | `func` | | |
| `renderDayContents` | `func` | `function(date) { |
Expand Down
10 changes: 8 additions & 2 deletions src/calendar.jsx
Expand Up @@ -148,8 +148,14 @@ export default class Calendar extends React.Component {
shouldCloseOnSelect: PropTypes.bool,
useShortMonthInDropdown: PropTypes.bool,
showDisabledMonthNavigation: PropTypes.bool,
previousMonthButtonLabel: PropTypes.string,
nextMonthButtonLabel: PropTypes.string,
previousMonthButtonLabel: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
nextMonthButtonLabel: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
previousYearButtonLabel: PropTypes.string,
nextYearButtonLabel: PropTypes.string,
renderCustomHeader: PropTypes.func,
Expand Down
10 changes: 8 additions & 2 deletions src/index.jsx
Expand Up @@ -221,8 +221,14 @@ export default class DatePicker extends React.Component {
excludeTimes: PropTypes.array,
useShortMonthInDropdown: PropTypes.bool,
clearButtonTitle: PropTypes.string,
previousMonthButtonLabel: PropTypes.string,
nextMonthButtonLabel: PropTypes.string,
previousMonthButtonLabel: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
nextMonthButtonLabel: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
previousYearButtonLabel: PropTypes.string,
nextYearButtonLabel: PropTypes.string,
timeInputLabel: PropTypes.string,
Expand Down

0 comments on commit c4bdd55

Please sign in to comment.