grafana/public/app/features/explore/Logs/LogsColumnSearch.tsx
Galen Kistler d1b938ba15
Logs: Table UI - Allow users to resize field selection section (#81201)
* allow user resize of fields section in table ui

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2024-01-31 19:58:02 +02:00

24 lines
723 B
TypeScript

import { css } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data/src';
import { Field, Input, useTheme2 } from '@grafana/ui/src';
function getStyles(theme: GrafanaTheme2) {
return {
searchWrap: css({
padding: `${theme.spacing(0.4)} 0 ${theme.spacing(0.4)} ${theme.spacing(0.4)}`,
}),
};
}
export function LogsColumnSearch(props: { onChange: (e: React.FormEvent<HTMLInputElement>) => void; value: string }) {
const theme = useTheme2();
const styles = getStyles(theme);
return (
<Field className={styles.searchWrap}>
<Input value={props.value} type={'text'} placeholder={'Search fields by name'} onChange={props.onChange} />
</Field>
);
}