Skip to content

Commit

Permalink
Align buttons on review submission page (#1151)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellemaxwell authored Jan 23, 2024
1 parent 47d1541 commit 9716d61
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions web/gds-user-ui/src/components/ReviewSubmit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
useDisclosure,
Box,
Flex,
Link
Link,
SimpleGrid,
} from '@chakra-ui/react';
import FormLayout from 'layouts/FormLayout';
import ConfirmationModal from 'components/ReviewSubmit/ConfirmationModal';
Expand Down Expand Up @@ -115,8 +116,8 @@ const ReviewSubmit: React.FC<ReviewSubmitProps> = ({
</Text>
</Text>
</FormLayout>
<Stack
direction={['column', 'row']}
<SimpleGrid
columns={{ base: 1, lg: 2 }}
justifyContent="space-around"
py={14}
width="100%"
Expand Down Expand Up @@ -188,26 +189,29 @@ const ReviewSubmit: React.FC<ReviewSubmitProps> = ({
<Stack
alignContent={'center'}
justifyContent={'center'}
height="100%"
mx="auto"
pb={4}
pt="2"
px="6"
pb="6"
alignItems={'center'}>
<Button
bgColor="#ff7a59f0"
color="#fff"
isDisabled={testnet || isTestnetNetworkFieldsIncomplete}
data-testid="testnet-submit-btn"
size="lg"
py={["null", "2.5rem", "2.8rem", "1.5rem"]}
isLoading={isTestNetSubmitting}
whiteSpace="normal"
maxW={[200, 250, 385]}
mt="auto"
py={{ base: '1rem', lg: '1.75rem' }}
width="100%"
boxShadow="lg"
onClick={(e) => {
onSubmitHandler(e, STEPPER_NETWORK.TESTNET);
}}
_hover={{
bgColor: '#f55c35'
}}
isLoading={isTestNetSubmitting}
isDisabled={testnet || isTestnetNetworkFieldsIncomplete}
data-testid="testnet-submit-btn"
onClick={(e) => {
onSubmitHandler(e, STEPPER_NETWORK.TESTNET);
}}>
{t`Submit TestNet Registration`}
</Button>
Expand Down Expand Up @@ -278,39 +282,41 @@ const ReviewSubmit: React.FC<ReviewSubmitProps> = ({
<Stack
alignContent={'center'}
justifyContent={'center'}
height="100%"
mx="auto"
pt="2"
alignItems={'center'}
pb={4}>
pb="6"
px="6">
<Button
bgColor="#23a7e0e8"
color="#fff"
size="lg"
py={["null", "2.5rem", "2.8rem", "1.5rem"]}
mt="auto"
py={{ base: '1rem', lg: '1.75rem' }}
width="100%"
_hover={{
bgColor: '#189fda'
}}
isLoading={isMainNetSubmitting}
isDisabled={mainnet || isMainnetNetworkIncomplete}
whiteSpace="normal"
boxShadow="lg"
data-testid="mainnet-submit-btn"
maxW={[200, 250, 385]}
onClick={(e) => {
onSubmitHandler(e, STEPPER_NETWORK.MAINNET);
}}
width="100%"
_hover={{
bgColor: '#189fda'
}}>
>
{t`Submit MainNet Registration`}
</Button>
</Stack>
</Stack>
</Stack>
</SimpleGrid>

<Box alignSelf={'flex-start'} textAlign="center" mx={'auto'}>
<Button
data-cy="back-to-review-section"
bgColor="#fff"
color="#1026F0"
onClick={handleJumpToLastStep}
size="lg"
py="2rem"
whiteSpace="normal"
Expand All @@ -319,7 +325,9 @@ const ReviewSubmit: React.FC<ReviewSubmitProps> = ({
width="100%"
_hover={{
bgColor: '#E6E6E6'
}}>
}}
data-cy="back-to-review-section"
onClick={handleJumpToLastStep}>
{t`Back to Review section`}
</Button>
</Box>
Expand Down

0 comments on commit 9716d61

Please sign in to comment.