Commit 25f15c05 authored by Max Alekseenko's avatar Max Alekseenko

replace AvailableSoonLabel with Tag

parent 40c66398
import { Flex, useColorModeValue } from '@chakra-ui/react';
import React from 'react';
const AvailableSoonLabel = () => (
<Flex
px={ 1 }
borderRadius="sm"
backgroundColor={ useColorModeValue('blue.50', 'blue.800') }
color={ useColorModeValue('blue.500', 'blue.100') }
fontSize="sm"
fontWeight="500"
h={ 6 }
alignItems="center"
>
Available soon
</Flex>
);
export default AvailableSoonLabel;
import { Flex, Text, useColorModeValue } from '@chakra-ui/react'; import { Flex, Text, useColorModeValue, Tag } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import AvailableSoonLabel from './AvailableSoonLabel';
type Props = { type Props = {
title?: string; title?: string;
description: string | React.ReactNode; description: string | React.ReactNode;
...@@ -39,7 +37,7 @@ const RewardsDashboardCard = ({ ...@@ -39,7 +37,7 @@ const RewardsDashboardCard = ({
{ title && ( { title && (
<Flex alignItems="center" gap={ 2 }> <Flex alignItems="center" gap={ 2 }>
<Text fontSize={{ base: 'md', md: 'lg' }} fontWeight="500">{ title }</Text> <Text fontSize={{ base: 'md', md: 'lg' }} fontWeight="500">{ title }</Text>
{ availableSoon && <AvailableSoonLabel/> } { availableSoon && <Tag colorScheme="blue">Available soon</Tag> }
</Flex> </Flex>
) } ) }
<Text as="div" fontSize="sm"> <Text as="div" fontSize="sm">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment