Skip to content

Commit

Permalink
Change spreadsheet acces theme
Browse files Browse the repository at this point in the history
To show it more similar as vote button
  • Loading branch information
selankon committed Nov 13, 2024
1 parent f920fa0 commit 9063a9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
14 changes: 8 additions & 6 deletions src/components/Process/Chained.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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
Expand All @@ -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}
</Box>
)
}
return (
<Box position='sticky' bottom={0} left={0} pb={1} pt={1} display={{ base: 'none', lg2: 'block' }}>
<Box position='sticky' bottom={0} left={0} pb={1} pt={1} display={isBreakPoint ? 'none' : 'block'}>
{children}
</Box>
)
Expand Down Expand Up @@ -195,8 +195,10 @@ const ChainedProcessesWrapper = () => {
</ElectionProvider>
)}
<VoteButtonContainer>
{!connected && election.get('census.type') === 'spreadsheet' && <SpreadsheetAccess />}
{isBlindCsp && !connected && <BlindCSPConnect />}
<Flex justifyContent='center' alignItems='center' direction={'column'} py={3} px={{ base: 3, lg2: 0 }}>
{!connected && election.get('census.type') === 'spreadsheet' && <SpreadsheetAccess />}
{isBlindCsp && !connected && <BlindCSPConnect />}
</Flex>
</VoteButtonContainer>
</Box>
)
Expand Down
16 changes: 5 additions & 11 deletions src/theme/components/SpreadSheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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',
},
})

Expand Down

0 comments on commit 9063a9e

Please sign in to comment.