From ec9fc8f6adbe4c8f4e6ddc38a4e3707bc3cdfd1c Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Mon, 9 Jan 2017 23:06:55 +0100 Subject: [PATCH] Allow passing elems to DocLabel --- src/components/fields/DocLabel.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/fields/DocLabel.jsx b/src/components/fields/DocLabel.jsx index 54dee3d..864c7f0 100644 --- a/src/components/fields/DocLabel.jsx +++ b/src/components/fields/DocLabel.jsx @@ -5,7 +5,10 @@ import { margins, fontSizes } from '../../config/scales.js' export default class DocLabel extends React.Component { static propTypes = { - label: React.PropTypes.string.isRequired, + label: React.PropTypes.oneOfType([ + React.PropTypes.object, + React.PropTypes.string + ]).isRequired, doc: React.PropTypes.string.isRequired, style: React.PropTypes.object, cursorTargetStyle: React.PropTypes.object,