mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
* Admin: Keeps expired keys visible in table after delete * Chore: covers component in tests before refactor * Refactor: splitting up into smaller components * Chore: fixes a small issue with the validation * Chore: forgot to export type
32 lines
901 B
TypeScript
32 lines
901 B
TypeScript
import React, { FC } from 'react';
|
|
|
|
import { FilterInput } from '../../core/components/FilterInput/FilterInput';
|
|
|
|
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
|
|
labelClassName="gf-form--has-input-icon gf-form--grow"
|
|
inputClassName="gf-form-input"
|
|
placeholder="Search keys"
|
|
value={searchQuery}
|
|
onChange={onSearchChange}
|
|
/>
|
|
</div>
|
|
|
|
<div className="page-action-bar__spacer" />
|
|
<button className="btn btn-primary pull-right" onClick={onAddClick} disabled={disabled}>
|
|
Add API key
|
|
</button>
|
|
</div>
|
|
);
|
|
};
|