mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
24 lines
637 B
TypeScript
24 lines
637 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),
|
||
|
}),
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export function LogsColumnSearch(props: { onChange: (e: React.FormEvent<HTMLInputElement>) => void }) {
|
||
|
const theme = useTheme2();
|
||
|
const styles = getStyles(theme);
|
||
|
return (
|
||
|
<Field className={styles.searchWrap}>
|
||
|
<Input type={'text'} placeholder={'Search fields by name'} onChange={props.onChange} />
|
||
|
</Field>
|
||
|
);
|
||
|
}
|