CustomTable.ts 1014 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import styled from "styled-components";
  2. import { Flex } from "reflexbox/styled-components";
  3. const Table = styled(Flex).attrs({
  4. as: "table",
  5. flex: "1 1 auto",
  6. flexDirection: "column",
  7. width: 1
  8. })`
  9. background-color: white;
  10. border-radius: 12px;
  11. box-shadow: 0 6px 30px rgba(50, 50, 50, 0.2);
  12. text-align: center;
  13. tr,
  14. th,
  15. td,
  16. tbody,
  17. thead,
  18. tfoot {
  19. display: flex;
  20. flex: 1 1 auto;
  21. }
  22. tr {
  23. border-bottom: 1px solid #eaeaea;
  24. }
  25. tbody tr:last-child {
  26. border-bottom-right-radius: 12px;
  27. border-bottom-left-radius: 12px;
  28. }
  29. tbody tr:last-child + tfoot {
  30. border: none;
  31. }
  32. tbody tr:hover {
  33. background-color: #f8f8f8;
  34. }
  35. thead {
  36. background-color: #f1f1f1;
  37. border-top-right-radius: 12px;
  38. border-top-left-radius: 12px;
  39. font-weight: bold;
  40. tr {
  41. border-bottom: 1px solid #dedede;
  42. }
  43. }
  44. tfoot {
  45. background-color: #f1f1f1;
  46. border-bottom-right-radius: 12px;
  47. border-bottom-left-radius: 12px;
  48. }
  49. `;
  50. export default Table;