Closed benmonro closed 8 years ago
I want to render a little red * next to required fields. As far as I can tell the way to check this is like so:
var required = locals.myInput.props.type.name !== 'Maybe';
It would be nice to instead just have a cleaner syntax like this:
<div>{locals.myInput.props.type.required && <span>*</span>}</div>
A more reliable way would be to test the meta object:
meta
var required = ( type.meta.kind !== 'maybe' );
Closing in favour of #210
I want to render a little red * next to required fields. As far as I can tell the way to check this is like so:
It would be nice to instead just have a cleaner syntax like this: