Skip to content

Commit a922a4c

Browse files
committed
fix year prop
1 parent 790a467 commit a922a4c

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

dash_mp_components/BibCard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class BibCard(Component):
4646
- title (string; optional):
4747
Title of the reference Will render as a link if doi is supplied.
4848
49-
- year (optional):
49+
- year (string | number; optional):
5050
Year of the reference as either a string or number."""
5151
_children_props = []
5252
_base_nodes = ['children']

dash_mp_components/dash_mp_components.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256383,7 +256383,7 @@
256383256383
className: s().string,
256384256384
title: s().string,
256385256385
author: s().string,
256386-
year: s().oneOfType[(s().string, s().number)],
256386+
year: s().oneOfType([s().string, s().number]),
256387256387
journal: s().string,
256388256388
doi: s().string,
256389256389
shortName: s().string,

dash_mp_components/dash_mp_components.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_mp_components/metadata.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,8 +3212,15 @@
32123212
},
32133213
"year": {
32143214
"type": {
3215-
"name": "custom",
3216-
"raw": "PropTypes.oneOfType[(PropTypes.string, PropTypes.number)]"
3215+
"name": "union",
3216+
"value": [
3217+
{
3218+
"name": "string"
3219+
},
3220+
{
3221+
"name": "number"
3222+
}
3223+
]
32173224
},
32183225
"required": false,
32193226
"description": "Year of the reference as either a string or number"

src/lib/components/publications/BibCard.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ BibCard.propTypes = {
4545
/**
4646
* Year of the reference as either a string or number
4747
*/
48-
year: PropTypes.oneOfType[(PropTypes.string, PropTypes.number)],
48+
year: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
4949

5050
/**
5151
* Name of the journal or publisher of the reference

0 commit comments

Comments
 (0)