grafana/public/app/features/playlist/PlaylistTable.tsx
Hugo Häggmark 51e7b87f39
Playlist: Migrates New/Edit pages to React (#32218)
* 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
2021-03-23 07:45:04 +01:00

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>
);
};