The props label and hintText are ReactNodes. They can therefore be null, undefined, or an empty string (""). In these cases, the rendered HTML will be an empty <label> tag. This PR fixes this issue.
There is a side effect: if the provided label or hintText is the boolean false, it will not be displayed. I don't think this is problematic; it will simply require casting the boolean to a string.
The props
label
andhintText
are ReactNodes. They can therefore be null, undefined, or an empty string (""). In these cases, the rendered HTML will be an empty<label>
tag. This PR fixes this issue.There is a side effect: if the provided
label
orhintText
is the booleanfalse
, it will not be displayed. I don't think this is problematic; it will simply require casting the boolean to a string.