Files
rubix-admin-panel/src/Pages/Community/CommunityBannerCard.jsx

65 lines
1.9 KiB
React
Raw Normal View History

2024-05-08 12:53:53 +05:30
import { Box, Button, Card, CardBody, CardHeader, Heading, Image, Text } from "@chakra-ui/react";
2024-05-07 12:47:06 +05:30
import React from "react";
import WebButton from "../../Components/WebButton";
import { formatDate } from "../../Components/Functions/UTCConvertor";
const CommunityBannerCard = ({ bgImage, subHeading, heading, ctoBtnTitle, createdAt }) => {
return (
<Card
2024-05-08 12:53:53 +05:30
// bgImage={`https://rubix.betadelivery.com/${bgImage}`}
2024-05-07 12:47:06 +05:30
color={'teal.900'}
bgSize="cover"
bgPosition="center"
w={"100%"}
h={"100%"}
size={"md"}
2024-05-08 12:53:53 +05:30
boxShadow='md'
2024-05-07 12:47:06 +05:30
overflow={'hidden'}
position={'relative'}
rounded={"lg"}
>
<CardBody
position={'absolute'}
2024-05-08 12:53:53 +05:30
h={"100%"}
2024-05-07 12:47:06 +05:30
w={'100%'}
bottom={0}
2024-05-08 12:53:53 +05:30
backgroundColor={'#ffffff'}
2024-05-07 12:47:06 +05:30
backdropFilter='blur(1px)'
>
2024-05-08 12:53:53 +05:30
2024-05-07 12:47:06 +05:30
2024-05-08 12:53:53 +05:30
<Box mb={0} display={'flex'} justifyContent={'space-between'} h={"100%"} w={"100%"}>
<Box display={"flex"} flexDirection={'column'} alignItems={"start"}>
<Heading className="web-text-large " mb={0} size="md">{heading}</Heading>
2024-05-07 12:47:06 +05:30
<Text className="web-text-medium" as={"span"} isTruncated={true}>
{subHeading}
</Text>
2024-05-08 12:53:53 +05:30
<Button fontWeight={"normal"} className="web-text-xsmall" ps={3} pe={3} color={'white'} bgGradient='linear(to-r, #1E114B, #1E114B)' variant={'solid'} rounded={'sm'} size={'xs'}>{ctoBtnTitle}</Button>
</Box>
<Box display={'flex'} alignItems={'center'}>
<Image boxShadow={'inner'} rounded={'sm'} w={140} h={"80px"} src={`https://rubix.betadelivery.com/${bgImage}`} />
</Box>
2024-05-07 12:47:06 +05:30
</Box>
2024-05-08 12:53:53 +05:30
2024-05-07 12:47:06 +05:30
</CardBody>
<span
className="web-text-xsmall fw-bold"
style={{
position:"absolute",
bottom:4,
right:10,
opacity:0.5
}}>{formatDate(createdAt)}</span>
</Card>
);
};
export default CommunityBannerCard;