2
0
Files
bot/apps/builder/components/results/ResultsTable/LoadingRows.tsx

42 lines
973 B
TypeScript
Raw Normal View History

2022-02-11 15:30:02 +01:00
import { chakra, Checkbox, Flex, Skeleton } from '@chakra-ui/react'
2021-12-30 10:24:16 +01:00
import React from 'react'
type LoadingRowsProps = {
totalColumns: number
}
export const LoadingRows = ({ totalColumns }: LoadingRowsProps) => {
return (
<>
{Array.from(Array(3)).map((_, idx) => (
2022-02-11 15:30:02 +01:00
<tr key={idx}>
<chakra.td
px="2"
2022-02-11 15:30:02 +01:00
py="2"
2021-12-30 10:24:16 +01:00
border="1px"
borderColor="gray.200"
width="40px"
2021-12-30 10:24:16 +01:00
>
<Flex ml="1">
2022-02-11 15:30:02 +01:00
<Checkbox isDisabled />
</Flex>
</chakra.td>
{Array.from(Array(totalColumns)).map((_, idx) => {
2021-12-30 10:24:16 +01:00
return (
2022-02-11 15:30:02 +01:00
<chakra.td
2021-12-30 10:24:16 +01:00
key={idx}
2022-02-11 15:30:02 +01:00
px="4"
py="2"
2021-12-30 10:24:16 +01:00
border="1px"
borderColor="gray.200"
>
<Skeleton height="5px" w="full" />
2022-02-11 15:30:02 +01:00
</chakra.td>
2021-12-30 10:24:16 +01:00
)
})}
2022-02-11 15:30:02 +01:00
</tr>
2021-12-30 10:24:16 +01:00
))}
</>
)
}