From cd16cb6eed9f2efda538555ba3d8ab6381d94735 Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Wed, 16 Jan 2019 07:14:31 +0000
Subject: [PATCH] Layout issues regarding fieldLength prop.
---
borgbutler-webapp/src/components/general/forms/FormComponents.jsx | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/borgbutler-webapp/src/components/general/forms/FormComponents.jsx b/borgbutler-webapp/src/components/general/forms/FormComponents.jsx
index c92b6f1..62b578b 100644
--- a/borgbutler-webapp/src/components/general/forms/FormComponents.jsx
+++ b/borgbutler-webapp/src/components/general/forms/FormComponents.jsx
@@ -80,10 +80,14 @@
</UncontrolledTooltip>;
}
const {fieldLength, className, hint, hintPlacement, id, ...other} = props;
+ let myClassName = className;
+ if (fieldLength > 0) {
+ myClassName = classNames(`col-sm-${props.fieldLength}`, className);
+ }
return (
<React.Fragment>
<Input id={targetId}
- className={classNames(`col-sm-${props.fieldLength}`, className)}
+ className={myClassName}
{...other}
/>
{tooltip}
@@ -113,7 +117,6 @@
name: '',
hint: null,
hintPlacement: 'top',
- fieldLength: 10,
value: '',
min: null,
max: null,
--
Gitblit v1.10.0