Initial commit
This commit is contained in:
89
src/components/Tables/DashboardTableRow.js
Normal file
89
src/components/Tables/DashboardTableRow.js
Normal file
@@ -0,0 +1,89 @@
|
||||
/*!
|
||||
|
||||
=========================================================
|
||||
* Argon Dashboard Chakra PRO - v1.0.0
|
||||
=========================================================
|
||||
|
||||
* Product Page: https://www.creative-tim.com/product/argon-dashboard-chakra-pro
|
||||
* Copyright 2022 Creative Tim (https://www.creative-tim.com/)
|
||||
|
||||
* Designed and Coded by Simmmple & Creative Tim
|
||||
|
||||
=========================================================
|
||||
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
*/
|
||||
|
||||
import {
|
||||
Avatar,
|
||||
AvatarGroup,
|
||||
Flex,
|
||||
Icon,
|
||||
Progress,
|
||||
Td,
|
||||
Text,
|
||||
Tr,
|
||||
useColorModeValue,
|
||||
} from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
|
||||
function DashboardTableRow(props) {
|
||||
const { logo, name, members, budget, progression } = props;
|
||||
const textColor = useColorModeValue("gray.700", "white");
|
||||
return (
|
||||
<Tr>
|
||||
<Td minWidth={{ sm: "250px" }} ps="0px">
|
||||
<Flex align="center" py=".8rem" minWidth="100%" flexWrap="nowrap">
|
||||
<Icon as={logo} h={"24px"} w={"24px"} pe="5px" />
|
||||
<Text
|
||||
fontSize="md"
|
||||
color={textColor}
|
||||
fontWeight="bold"
|
||||
minWidth="100%"
|
||||
>
|
||||
{name}
|
||||
</Text>
|
||||
</Flex>
|
||||
</Td>
|
||||
|
||||
<Td>
|
||||
<AvatarGroup size="sm">
|
||||
{members.map((member, index) => {
|
||||
return (
|
||||
<Avatar
|
||||
name="Ryan Florence"
|
||||
src={member}
|
||||
_hover={{ zIndex: "3", cursor: "pointer" }}
|
||||
key={index}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</AvatarGroup>
|
||||
</Td>
|
||||
<Td>
|
||||
<Text fontSize="md" color={textColor} fontWeight="bold" pb=".5rem">
|
||||
{budget}
|
||||
</Text>
|
||||
</Td>
|
||||
<Td>
|
||||
<Flex direction="column">
|
||||
<Text
|
||||
fontSize="md"
|
||||
color="teal.300"
|
||||
fontWeight="bold"
|
||||
pb=".2rem"
|
||||
>{`${progression}%`}</Text>
|
||||
<Progress
|
||||
colorScheme={progression === 100 ? "teal" : "cyan"}
|
||||
size="xs"
|
||||
value={progression}
|
||||
borderRadius="15px"
|
||||
/>
|
||||
</Flex>
|
||||
</Td>
|
||||
</Tr>
|
||||
);
|
||||
}
|
||||
|
||||
export default DashboardTableRow;
|
||||
Reference in New Issue
Block a user