Input: Fix margins when not using prefix/suffix (#43726)

pull/43755/head
Giordano Ricci 4 years ago committed by GitHub
parent c8e7368ea6
commit 0013eb3555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/grafana-ui/src/components/Input/Input.tsx

@ -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,
}}
/>

Loading…
Cancel
Save