2
0

🪥 Consult submissions

This commit is contained in:
Baptiste Arnaud
2021-12-30 10:24:16 +01:00
parent f088f694b9
commit 1093453c07
25 changed files with 575 additions and 138 deletions

View File

@ -0,0 +1,44 @@
import { Checkbox, Flex, Skeleton } from '@chakra-ui/react'
import React from 'react'
type LoadingRowsProps = {
totalColumns: number
}
export const LoadingRows = ({ totalColumns }: LoadingRowsProps) => {
return (
<>
{Array.from(Array(3)).map((row, idx) => (
<Flex as="tr" key={idx}>
<Flex
key={idx}
py={2}
px={4}
border="1px"
as="td"
borderColor="gray.200"
flex="0"
>
<Checkbox isDisabled />
</Flex>
{Array.from(Array(totalColumns)).map((cell, idx) => {
return (
<Flex
key={idx}
py={2}
px={4}
border="1px"
as="td"
borderColor="gray.200"
flex="1"
align="center"
>
<Skeleton height="5px" w="full" />
</Flex>
)
})}
</Flex>
))}
</>
)
}