mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 08:47:12 -06:00
51e7b87f39
* WIP: initial commit * Playlist: Migrates New/Edit to React * Tests: adds tests for PlaylistForm * Tests: adds more tests * Chore: moved some styles * Chore: updates after PR review
26 lines
740 B
TypeScript
26 lines
740 B
TypeScript
import React, { FC } from 'react';
|
|
|
|
import { PlaylistTableRows } from './PlaylistTableRows';
|
|
import { PlaylistItem } from './types';
|
|
|
|
interface PlaylistTableProps {
|
|
items: PlaylistItem[];
|
|
onMoveUp: (item: PlaylistItem) => void;
|
|
onMoveDown: (item: PlaylistItem) => void;
|
|
onDelete: (item: PlaylistItem) => void;
|
|
}
|
|
|
|
export const PlaylistTable: FC<PlaylistTableProps> = ({ items, onMoveUp, onMoveDown, onDelete }) => {
|
|
return (
|
|
<div className="gf-form-group">
|
|
<h3 className="page-headering">Dashboards</h3>
|
|
|
|
<table className="filter-table">
|
|
<tbody>
|
|
<PlaylistTableRows items={items} onMoveUp={onMoveUp} onMoveDown={onMoveDown} onDelete={onDelete} />
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
);
|
|
};
|