ApiKeysActionBar.tsx 664 B

1234567891011121314151617181920212223
  1. import React, { FC } from 'react';
  2. import { Button, FilterInput } from '@grafana/ui';
  3. interface Props {
  4. searchQuery: string;
  5. disabled: boolean;
  6. onAddClick: () => void;
  7. onSearchChange: (value: string) => void;
  8. }
  9. export const ApiKeysActionBar: FC<Props> = ({ searchQuery, disabled, onAddClick, onSearchChange }) => {
  10. return (
  11. <div className="page-action-bar">
  12. <div className="gf-form gf-form--grow">
  13. <FilterInput placeholder="Search keys" value={searchQuery} onChange={onSearchChange} />
  14. </div>
  15. <Button className="pull-right" onClick={onAddClick} disabled={disabled}>
  16. Add API key
  17. </Button>
  18. </div>
  19. );
  20. };