UNPKG

lbs-react-table

Version:

A table component made with React, with pagination, search and sorting. Works on small screens.

182 lines (158 loc) 3.17 kB
table { border-spacing: 0px; } .react-pagination-table { font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; } .items-table { margin: 32px 0px; width: 100%; border: solid #f2f2f2 1px; border-radius: 4px; background-color: white; } .items-table thead th { background-color: #f8fafb; color: #666666; font-size: 10px; font-weight: 400; cursor: pointer; font-weight: 800; display: flex; justify-content: center; align-items: center; position: relative; } .table-header-text { display: flex; flex-direction: row; width: 100%; word-wrap: break-word; word-break: break-all; } .sort-icon { margin: 0px 4px; } .items-table tr { height: 64px; display: flex; flex-direction: row; } tr:hover { font-weight: 800; } .items-table td { text-align: center; border: none; color: #666666; font-size: 10px; width: 100%; display: flex; justify-content: center; align-items: center; } .pagination-container { display: flex; justify-content: space-between; color: #666666; font-size: 16px; margin: 0px 0px 32px 0px; } .pagination-nav { display: flex; } .pagination-container button { background: none; border: none; color: #666666; font-family: lato, Arial, Helvetica, sans-serif; font-size: 16px; margin: 0px 4px; cursor: pointer; } .pagination-indexNumber { margin: 0px 4px; height: 32px; width: 32px; display: flex; justify-content: center; align-items: center; cursor: pointer; } .pagination-index { display: flex; align-items: center; } .pagination-active { background-color: rgba(18, 149, 133, 0.12); border-radius: 99px; } .table-options-area { display: flex; justify-content: space-between; align-items: center; font-size: 16px; color: white; background: rgb(54, 203, 158); background: linear-gradient(90deg, rgba(54, 203, 158, 1) 0%, rgba(56, 194, 194, 1) 100%); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px; height: 96px; margin: 32px 0px 0px 0px; flex-wrap: wrap; width: 100%; } .search-container { display: flex; align-items: center; } .search-container input { border: solid 1px #f2f2f2; height: 32px; border-radius: 4px; font-size: 10px; font-family: lato, Arial, Helvetica, sans-serif; padding: 0px 8px; color: #666666; margin: 0px 16px; } .search-container label { margin: 0px 16px; } .pagination-settings-container { margin: 0px 16px; height: 32px; display: flex; align-items: center; } .pagination-settings-container select { margin: 0px 8px; } .pagination-dots { color: #c0c0c0; cursor: default; width: 10px; } .pagination-index-error { color: #e74c3c; } @media screen and (max-width: 720px) { .table-options-area { height: 128px; } .table-header-text { min-width: 90px; } .items-table { max-width: 100%; overflow-x: scroll; position: relative; display: block; } .pagination-container { font-size: 10px; } .pagination-container button { font-size: 10px; } }