Prometheus: Create AutoSizeInput with dynamic width (#45601)

* Autosize input for dynamic width

* Update

* Refactoring to use measureText util instead

* removed react fragment tags

* Add tests

* Use AutoSize input in legend, step and nested queries vector matcher

* Update

* Remove unused imports

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Ivana Huckova
2022-02-28 10:52:58 +01:00
committed by GitHub
co-authored by Torkel Ödegaard
parent 9b6552c7b4
commit 4ab191b612
7 changed files with 145 additions and 27 deletions
@@ -43,7 +43,7 @@ export const Input = React.forwardRef<HTMLInputElement, Props>((props, ref) => {
const styles = getInputStyles({ theme, invalid: !!invalid, width });
return (
<div className={cx(styles.wrapper, className)}>
<div className={cx(styles.wrapper, className)} data-testid={'input-wrapper'}>
{!!addonBefore && <div className={styles.addon}>{addonBefore}</div>}
<div className={styles.inputWrapper}>