FeaturedCard.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { Flex, ScaleFade } from '@chakra-ui/react';
  2. import React from 'react';
  3. import { AppInfo } from '../../../generated/graphql';
  4. interface IProps {
  5. app: AppInfo;
  6. show: boolean;
  7. }
  8. const FeaturedCard: React.FC<IProps> = ({ app, show }) => {
  9. return (
  10. <ScaleFade initialScale={0.9} in={show}>
  11. <Flex
  12. className="overflow-hidden absolute left-0 right-0 border-2"
  13. height={200}
  14. rounded="md"
  15. shadow="md"
  16. style={{
  17. backgroundImage: 'url(https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80)',
  18. }}
  19. >
  20. <div className="relative flex flex-1 w-max lg:bg-gradient-to-r from-white via-white">
  21. <div className="flex absolute bottom-0 flex-row p-3">
  22. <div className="self-end mb-1">
  23. <div className="font-bold text-xl">{app.name}</div>
  24. <div className="text-md">{app.short_desc}</div>
  25. </div>
  26. </div>
  27. </div>
  28. </Flex>
  29. </ScaleFade>
  30. );
  31. };
  32. export default FeaturedCard;