[v8.3.x] Input: Fix margins when not using prefix/suffix (#43759)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
Grot (@grafanabot)
2022-01-06 14:43:45 +01:00
committed by GitHub
co-authored by Giordano Ricci
parent ee892eec78
commit 101af6a66d
@@ -58,8 +58,8 @@ export const Input = React.forwardRef<HTMLInputElement, Props>((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,
}}
/>