From 1c087fae322a1b07bb7bd554ee10ff473c47c727 Mon Sep 17 00:00:00 2001
From: Fin Reinhard <fin.reinhard@icloud.com>
Date: Tue, 22 Jan 2019 20:51:03 +0000
Subject: [PATCH] Merge branch 'master' into feature/15-archive-view-url
---
borgbutler-webapp/src/components/general/forms/FormSelect.jsx | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/borgbutler-webapp/src/components/general/forms/FormSelect.jsx b/borgbutler-webapp/src/components/general/forms/FormSelect.jsx
index 6b0bd21..906fcae 100644
--- a/borgbutler-webapp/src/components/general/forms/FormSelect.jsx
+++ b/borgbutler-webapp/src/components/general/forms/FormSelect.jsx
@@ -12,11 +12,15 @@
{props.hint}
</UncontrolledTooltip>;
}
- const {className, hint, hintPlacement, id, ...other} = props;
+ const {fieldLength, className, hint, hintPlacement, id, ...other} = props;
+ let myClassName = className;
+ if (fieldLength > 0) {
+ myClassName = classNames(`col-sm-${props.fieldLength}`, className);
+ }
return (
<React.Fragment>
<select id={targetId}
- className={classNames('custom-select form-control form-control-sm mr-1', className)}
+ className={classNames('custom-select form-control form-control-sm mr-1', myClassName)}
{...other}
>
{props.children}
@@ -31,6 +35,7 @@
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
name: PropTypes.string,
onChange: PropTypes.func,
+ fieldLength: PropTypes.number,
hint: PropTypes.string,
hintPlacement: PropTypes.oneOf(['right', 'top']),
children: PropTypes.node,
--
Gitblit v1.10.0