Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: revamp weekly top #65

Open
wants to merge 2 commits into
base: prod
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 46 additions & 33 deletions src/components/Dashboard/DashboardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { useRouter } from 'next/router';
import { useState } from 'react';
import { BiSearchAlt2 } from 'react-icons/bi';
import { skillKind } from '../../enums/skill';
import CustomTag from '../HOC/Tag.HOC';
import { receivedXPFromAirtableType } from './Row/interfaces/airtableRecievedXP';

type propsType = {
Expand Down Expand Up @@ -89,6 +90,12 @@ const DashboardHeader = ({
'superteamBlack.100',
'superteamWhite.100'
);

const pillBgColor = useColorModeValue(
'rgba(251, 252, 253, 1)',
'rgba(22, 26, 34, 0.72)'
);

return (
<Container
fontFamily={'Inter'}
Expand Down Expand Up @@ -195,26 +202,33 @@ const DashboardHeader = ({
</Box>
</VStack>
<HStack
backgroundColor={useColorModeValue(
'superteamWhite',
'superteamGreyDT.900'
)}
align={'top'}
minH={'13rem'}
height="full"
padding="4"
gap="1.2rem"
width={['full', 'auto', 'auto', 'auto']}
justify={'space-between'}
boxShadow="inner"
rounded={'8px'}
>
{/* <Box display="flex" flexDir={'column'} alignItems="end">
<Box display="flex" flexDir={'column'} alignItems="start">
<HStack
marginStart={'1.2rem'}
width={'fit-content'}
roundedTop={'4px'}
padding="6px 12px"
padding="12px 16px"
fontSize={'13px'}
backgroundColor={useColorModeValue(
'superteamBlueLT.800',
'superteamOrange.800'
)}
color="white"
color={useColorModeValue('superteamBlack', 'superteamWhite')}
whiteSpace="nowrap"
rounded={'4px'}
backgroundClip={pillBgColor}
boxShadow="inner"
>
<Text>Weekly top : </Text>
<Text as="b">Weekly top: </Text>
<Select
variant="unstyled"
fontSize={'13px'}
Expand Down Expand Up @@ -247,7 +261,6 @@ const DashboardHeader = ({
padding={'16px 20px'}
roundedBottom="4px"
roundedTopLeft={'4px'}
border={'1px solid'}
borderColor={useColorModeValue(
'superteamBlueLT.800',
'superteamOrange.800'
Expand All @@ -264,36 +277,36 @@ const DashboardHeader = ({
w={'100%'}
justifyContent="space-between"
key={index}
padding={'12px 24px'}
rounded={'4px'}
boxShadow="lg"
flexDir={'row'}
bgColor={pillBgColor}
>
<HStack gap="1.2rem" alignItems={'flex-start'}>
<MedalSVG index={index + 1} showIndex={false} />

<VStack alignItems={'start'}>
<Text
lineHeight={'12px'}
fontWeight={'600'}
color={darkTextColor}
fontSize={'14px'}
textTransform="capitalize"
textAlign={'start'}
>
{el.name.split('#')[0]}
</Text>
<Text
lineHeight={'10px'}
color={lightTextColor}
opacity="0.8"
fontSize={'12px'}
>
{el.name}
</Text>
</VStack>
<Text
lineHeight={'12px'}
fontWeight={'500'}
color={darkTextColor}
fontSize={'14px'}
textAlign={'start'}
>
{index + 1}.
</Text>
<Text
lineHeight={'12px'}
color={darkTextColor}
fontWeight={'500'}
fontSize={'14px'}
textAlign={'start'}
>
{el.name.trim()}
</Text>
</HStack>
<HStack>
<Text
fontWeight={'600'}
color={darkTextColor}
fontWeight={'500'}
fontSize={'14px'}
>
{el.xp.total_amount}
Expand Down
4 changes: 2 additions & 2 deletions src/components/HOC/Tag.HOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Box, Text, useColorModeValue } from '@chakra-ui/react';
const CustomTag = ({ text }: any) => {
return (
<Box
bg={useColorModeValue('superteamGreyLT.100', 'superteamGreyDT.800')}
color={useColorModeValue('superteamGreyLT.900', 'superteamGreyDT.100')}
bg={useColorModeValue('superteamGreyLT.400', 'superteamGreyDT.750')}
color={useColorModeValue('superteamBlack', 'superteamGreyLT.25')}
opacity="0.8"
fontSize={'10px'}
p="1px 6px 1px 6px"
Expand Down