Skip to content

Commit 9063a9e

Browse files
committed
Change spreadsheet acces theme
To show it more similar as vote button
1 parent f920fa0 commit 9063a9e

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

src/components/Process/Chained.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Progress, useBreakpointValue } from '@chakra-ui/react'
1+
import { Box, Flex, Progress, useBreakpointValue } from '@chakra-ui/react'
22
import { ConnectButton } from '@rainbow-me/rainbowkit'
33
import {
44
ElectionQuestions,
@@ -17,7 +17,7 @@ import BlindCSPConnect from '~components/Process/BlindCSPConnect'
1717
import { ConfirmVoteModal } from '~components/Process/ConfirmVoteModal'
1818
import { MultiElectionSuccessVoteModal, SuccessVoteModal } from '~components/Process/SuccessVoteModal'
1919
import VotingVoteModal, { MultiElectionVotingVoteModal } from '~components/Process/VotingVoteModal'
20-
import { ChainedProvider, useChainedProcesses } from '~components/Process/ChainedContext'
20+
import { ChainedProvider, useChainedProcesses } from './ChainedContext'
2121

2222
type ChainedProcessesInnerProps = {
2323
connected: boolean
@@ -33,14 +33,14 @@ const VoteButtonContainer = ({ children }: PropsWithChildren) => {
3333
left={0}
3434
bgColor='process.aside.aside_footer_mbl_border'
3535
pt={1}
36-
display={{ base: 'block', lg2: 'none' }}
36+
display={isBreakPoint ? 'block' : 'none'}
3737
>
3838
{children}
3939
</Box>
4040
)
4141
}
4242
return (
43-
<Box position='sticky' bottom={0} left={0} pb={1} pt={1} display={{ base: 'none', lg2: 'block' }}>
43+
<Box position='sticky' bottom={0} left={0} pb={1} pt={1} display={isBreakPoint ? 'none' : 'block'}>
4444
{children}
4545
</Box>
4646
)
@@ -195,8 +195,10 @@ const ChainedProcessesWrapper = () => {
195195
</ElectionProvider>
196196
)}
197197
<VoteButtonContainer>
198-
{!connected && election.get('census.type') === 'spreadsheet' && <SpreadsheetAccess />}
199-
{isBlindCsp && !connected && <BlindCSPConnect />}
198+
<Flex justifyContent='center' alignItems='center' direction={'column'} py={3} px={{ base: 3, lg2: 0 }}>
199+
{!connected && election.get('census.type') === 'spreadsheet' && <SpreadsheetAccess />}
200+
{isBlindCsp && !connected && <BlindCSPConnect />}
201+
</Flex>
200202
</VoteButtonContainer>
201203
</Box>
202204
)

src/theme/components/SpreadSheet.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpe
55

66
const baseStyle = definePartsStyle({
77
button: {
8-
w: '100%',
8+
w: '60%',
99
borderRadius: 30,
1010
fontSize: { base: 'lg', xl: 'md' },
1111
bgColor: 'process.aside.vote_btn_bg',
12-
1312
_hover: {
1413
bgColor: 'process.aside.vote_btn_bg',
1514
},
15+
mb: 4,
16+
py: 3,
17+
height: '50px',
1618
},
1719

1820
disconnect: {
@@ -41,16 +43,8 @@ const baseStyle = definePartsStyle({
4143
submit: {
4244
width: '60%',
4345
mx: 'auto',
44-
bgColor: 'process.identify_btn.bg',
45-
color: 'process.identify_btn.color',
4646
borderRadius: '30px',
47-
48-
_hover: {
49-
bgColor: 'process.identify_btn.bg_hover',
50-
},
51-
_active: {
52-
bgColor: 'process.identify_btn.bg_active',
53-
},
47+
color: 'process.spreadsheet.color',
5448
},
5549
})
5650

0 commit comments

Comments
 (0)