Skip to content

Commit

Permalink
fix error datatable
Browse files Browse the repository at this point in the history
  • Loading branch information
karenyov committed Apr 11, 2023
1 parent 65e734f commit ea8fbc8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/components/DataTableBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function DataTableBase({ columns, data, title = "" }: Props) {
const tableCustomStyles = {
table: {
style: {
marginBottom: data.length === 1 ? "20px" : "",
marginBottom: data.length <= 2 ? "90px" : "",
color:
colorMode == "dark"
? theme.colors.gray["300"]
Expand Down Expand Up @@ -57,7 +57,7 @@ export default function DataTableBase({ columns, data, title = "" }: Props) {
},
rows: {
style: {
marginBottom: data.length === 1 ? "60px" : "",
marginBottom: data.length <= 2 ? "10px" : "",
color: colorMode == "dark" ? "white" : "black",
backgroundColor:
colorMode == "dark" ? theme.colors.gray["800"] : "white",
Expand Down
15 changes: 7 additions & 8 deletions src/components/tables/DebtsAllTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,17 @@ export default function DebtsAllTable({ userId }: Props) {
{debts.length === 0 ? (
<Text>Nenhum registro encontrado.</Text>
) : (
<Tabs position="relative" variant="unstyled">
<Tabs isFitted variant="unstyled">
<TabList>
{categoriesDebt.map((category) => (
<Tab key={category.categoryId}>{category.description}</Tab>
<Tab
key={category.categoryId}
_selected={{ color: "white", bg: "secondary.500" }}
>
<Text as="b">{category.description}</Text>
</Tab>
))}
</TabList>
<TabIndicator
mt="-1.5px"
height="2px"
bg="secondary.500"
borderRadius="1px"
/>
<TabPanels>
{debts.map((category) => (
<TabPanel key={category.categoryId}>
Expand Down
15 changes: 7 additions & 8 deletions src/pages/debt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -814,18 +814,17 @@ export default function Debt() {
</HStack>
<Divider mt={2} />

<Tabs position="relative" variant="unstyled">
<Tabs isFitted variant="unstyled">
<TabList>
{categoriesDebt.map((category) => (
<Tab key={category.categoryId}>{category.description}</Tab>
<Tab
key={category.categoryId}
_selected={{ color: "white", bg: "secondary.500" }}
>
<Text as="b">{category.description}</Text>
</Tab>
))}
</TabList>
<TabIndicator
mt="-1.5px"
height="2px"
bg="secondary.500"
borderRadius="1px"
/>
<TabPanels>
{debts.map((category) => (
<TabPanel key={category.categoryId}>
Expand Down

0 comments on commit ea8fbc8

Please sign in to comment.