From 0013eb35557a90e890b42df1fbc0676911aaef08 Mon Sep 17 00:00:00 2001 From: Giordano Ricci Date: Thu, 6 Jan 2022 14:27:27 +0100 Subject: [PATCH] Input: Fix margins when not using prefix/suffix (#43726) --- packages/grafana-ui/src/components/Input/Input.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/Input/Input.tsx b/packages/grafana-ui/src/components/Input/Input.tsx index 2830cb114cb..4f2eb4664b2 100644 --- a/packages/grafana-ui/src/components/Input/Input.tsx +++ b/packages/grafana-ui/src/components/Input/Input.tsx @@ -58,8 +58,8 @@ export const Input = React.forwardRef((props, ref) => { className={styles.input} {...restProps} style={{ - paddingLeft: prefixRect ? prefixRect.width + 12 : undefined, - paddingRight: suffixRect && (suffix || loading) ? suffixRect.width + 12 : undefined, + paddingLeft: prefix ? prefixRect.width + 12 : undefined, + paddingRight: suffix || loading ? suffixRect.width + 12 : undefined, }} />