From 9063a9e70def9535e770aea4f7669dc82b5d1033 Mon Sep 17 00:00:00 2001 From: selankon Date: Wed, 13 Nov 2024 07:51:17 -0300 Subject: [PATCH] Change spreadsheet acces theme To show it more similar as vote button --- src/components/Process/Chained.tsx | 14 ++++++++------ src/theme/components/SpreadSheet.ts | 16 +++++----------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/components/Process/Chained.tsx b/src/components/Process/Chained.tsx index 825fa8e..0877872 100644 --- a/src/components/Process/Chained.tsx +++ b/src/components/Process/Chained.tsx @@ -1,4 +1,4 @@ -import { Box, Progress, useBreakpointValue } from '@chakra-ui/react' +import { Box, Flex, Progress, useBreakpointValue } from '@chakra-ui/react' import { ConnectButton } from '@rainbow-me/rainbowkit' import { ElectionQuestions, @@ -17,7 +17,7 @@ import BlindCSPConnect from '~components/Process/BlindCSPConnect' import { ConfirmVoteModal } from '~components/Process/ConfirmVoteModal' import { MultiElectionSuccessVoteModal, SuccessVoteModal } from '~components/Process/SuccessVoteModal' import VotingVoteModal, { MultiElectionVotingVoteModal } from '~components/Process/VotingVoteModal' -import { ChainedProvider, useChainedProcesses } from '~components/Process/ChainedContext' +import { ChainedProvider, useChainedProcesses } from './ChainedContext' type ChainedProcessesInnerProps = { connected: boolean @@ -33,14 +33,14 @@ const VoteButtonContainer = ({ children }: PropsWithChildren) => { left={0} bgColor='process.aside.aside_footer_mbl_border' pt={1} - display={{ base: 'block', lg2: 'none' }} + display={isBreakPoint ? 'block' : 'none'} > {children} ) } return ( - + {children} ) @@ -195,8 +195,10 @@ const ChainedProcessesWrapper = () => { )} - {!connected && election.get('census.type') === 'spreadsheet' && } - {isBlindCsp && !connected && } + + {!connected && election.get('census.type') === 'spreadsheet' && } + {isBlindCsp && !connected && } + ) diff --git a/src/theme/components/SpreadSheet.ts b/src/theme/components/SpreadSheet.ts index 3134ead..404813e 100644 --- a/src/theme/components/SpreadSheet.ts +++ b/src/theme/components/SpreadSheet.ts @@ -5,14 +5,16 @@ const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpe const baseStyle = definePartsStyle({ button: { - w: '100%', + w: '60%', borderRadius: 30, fontSize: { base: 'lg', xl: 'md' }, bgColor: 'process.aside.vote_btn_bg', - _hover: { bgColor: 'process.aside.vote_btn_bg', }, + mb: 4, + py: 3, + height: '50px', }, disconnect: { @@ -41,16 +43,8 @@ const baseStyle = definePartsStyle({ submit: { width: '60%', mx: 'auto', - bgColor: 'process.identify_btn.bg', - color: 'process.identify_btn.color', borderRadius: '30px', - - _hover: { - bgColor: 'process.identify_btn.bg_hover', - }, - _active: { - bgColor: 'process.identify_btn.bg_active', - }, + color: 'process.spreadsheet.color', }, })