MCPcopy Create free account
hub / github.com/parse-community/parse-dashboard / Field

Function Field

src/components/Field/Field.react.js:12–42  ·  view source on GitHub ↗
({ label, input, labelWidth = 50, labelPadding, height, className })

Source from the content-addressed store, hash-verified

10import styles from 'components/Field/Field.scss';
11
12const Field = ({ label, input, labelWidth = 50, labelPadding, height, className }) => {
13 const classes = [styles.field];
14 if (className) {
15 classes.push(className);
16 }
17 labelWidth = labelWidth || 50;
18 if (label && labelPadding) {
19 label = React.cloneElement(label, {
20 ...label.props,
21 padding: labelPadding,
22 });
23 }
24 return (
25 <div
26 className={classes.join(' ')}
27 style={{ '--modal-label-ratio': labelWidth / 100 }}
28 >
29 <div
30 className={styles.left}
31 style={{
32 height: height,
33 }}
34 >
35 {label}
36 </div>
37 <div className={styles.right} style={{ height: height }}>
38 {input}
39 </div>
40 </div>
41 );
42};
43
44export default Field;
45

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected