grafana/public/app/features/api-keys/ApiKeysActionBar.tsx
Dominik Prokop f887576a27
Table panel: Make filter case insensitive (#39746)
* Expose FilterInput from grafana/ui

* Make table filter case insensitive

* Update packages/grafana-ui/src/components/Table/FilterList.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-29 09:35:41 +02:00

23 lines
663 B
TypeScript

import React, { FC } from 'react';
import { Button, FilterInput } from '@grafana/ui';
interface Props {
searchQuery: string;
disabled: boolean;
onAddClick: () => void;
onSearchChange: (value: string) => void;
}
export const ApiKeysActionBar: FC<Props> = ({ searchQuery, disabled, onAddClick, onSearchChange }) => {
return (
<div className="page-action-bar">
<div className="gf-form gf-form--grow">
<FilterInput placeholder="Search keys" value={searchQuery} onChange={onSearchChange} />
</div>
<Button className="pull-right" onClick={onAddClick} disabled={disabled}>
Add API key
</Button>
</div>
);
};