MCPcopy Index your code
hub / github.com/Lobos/react-ui / getHint

Method getHint

src/FormControl.js:105–122  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

103 }
104
105 getHint (props) {
106 if (props.required) {
107 this.required = true;
108 }
109
110 if (props.tip) {
111 return '';
112 }
113
114 let valueType = getValueType(props.type);
115 let hints = [];
116
117 setHint(hints, this.props.type);
118 if (props.min) { setHint(hints, `min.${valueType}`, props.min); }
119 if (props.max) { setHint(hints, `max.${valueType}`, props.max); }
120
121 return (props.label || '') + hints.join(', ');
122 }
123
124 setChildrenHint (hints, children) {
125 Children.toArray(children).forEach((child) => {

Callers 2

setChildrenHintMethod · 0.95
setItemsMethod · 0.95

Calls 2

getValueTypeFunction · 0.90
setHintFunction · 0.85

Tested by

no test coverage detected