TableRows.jsx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // ./src/stories/TableRows.js
  2. import React from 'react';
  3. import {QueueRow} from "./QueueRow";
  4. /**
  5. * A list of queues.
  6. *
  7. * @param rows
  8. * @returns {JSX.Element}
  9. * @constructor
  10. */
  11. const TableRows = ({rows = []}) => {
  12. return (
  13. <table>
  14. <thead className="bg-gray-200 border-b">
  15. <tr>
  16. <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
  17. #
  18. </th>
  19. <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
  20. Nom
  21. </th>
  22. <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
  23. ARN
  24. </th>
  25. <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
  26. Messages
  27. </th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. {rows.map((row, index) => {
  32. return <QueueRow key={index}
  33. index={index + 1}
  34. arn={row.props.arn}
  35. itemCount={row.props.itemCount}
  36. qName={row.props.qName}
  37. url={row.props.url}/>
  38. })}
  39. </tbody>
  40. <React.StrictMode/>
  41. </table>
  42. );
  43. }
  44. export {
  45. TableRows,
  46. }