Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 293f74e

Browse files
authored
Allow nodes for the value of messages
The `Errors` component would issue a proptype warning when passing an element as the message, despite happily rendering it. Changing it to from `string` to `node` will allow rendering renderable things without throwing proptype warnings.
1 parent d17e04c commit 293f74e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/errors-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const propTypes = {
3131
// Provided props
3232
model: PropTypes.string.isRequired,
3333
messages: PropTypes.objectOf(PropTypes.oneOfType([
34-
PropTypes.string,
34+
PropTypes.node,
3535
PropTypes.func,
3636
PropTypes.bool,
3737
])),

0 commit comments

Comments
 (0)