All files / app/components/home stacking-begins-soon-card.tsx

0% Statements 0/5
0% Branches 0/4
0% Functions 0/1
0% Lines 0/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36                                                                       
import { Flex, Text, Box, color } from '@stacks/ui';
import React, { FC } from 'react';
 
interface StackingBeginsSoonCardProps {
  blocksTillNextCycle?: number;
}
 
export const StackingBeginsSoonCard: FC<StackingBeginsSoonCardProps> = ({
  blocksTillNextCycle,
}) => (
  <Flex
    flexDirection="column"
    flex={1}
    justifyContent="center"
    textAlign="center"
    alignItems="center"
    mt="extra-loose"
    borderRadius="8px"
    boxShadow="0px 1px 2px rgba(0, 0, 0, 0.04);"
    border={`1px solid ${color('border')}`}
    px="loose"
    minHeight="180px"
  >
    <Box>
      <Text display="block" textStyle="body.small" color={color('text-caption')} width="100%">
        Stacking will begin in the next cycle
      </Text>
      {typeof blocksTillNextCycle === 'number' ? (
        <Text textStyle="caption" color={color('text-caption')}>
          {blocksTillNextCycle} block{blocksTillNextCycle > 1 && 's'} to go
        </Text>
      ) : null}
    </Box>
  </Flex>
);