Skip to content

Commit

Permalink
add close corner button
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanlesich committed Oct 23, 2023
1 parent f570420 commit 5dbde05
Showing 1 changed file with 24 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Atoms, Box, Flex, Stack, Text, theme } from '@zoralabs/zord'
import { Atoms, Box, Button, Flex, Stack, Text, theme } from '@zoralabs/zord'
import { Field, Formik, Form as FormikForm } from 'formik'
import React, { Fragment } from 'react'
import { useSWRConfig } from 'swr'
Expand Down Expand Up @@ -116,11 +116,7 @@ const VoteModal: React.FC<{
return (
<Fragment>
{/* Vote Modal */}
<AnimatedModal
open={showVoteModal}
close={() => setShowVoteModal(false)}
size={isCastVoteSuccess ? 'small' : 'medium'}
>
<AnimatedModal open={showVoteModal} size={isCastVoteSuccess ? 'small' : 'medium'}>
{isCastVoteSuccess ? (
<SuccessModalContent
success={true}
Expand All @@ -129,14 +125,28 @@ const VoteModal: React.FC<{
/>
) : (
<Box>
<Box>
<Text variant="heading-md" className={proposalFormTitle}>
{votesAvailable === 0 ? 'Submit Vote' : 'Submit Votes'}
</Text>
<Text variant="paragraph-sm" color="tertiary">
Proposal: {title}
</Text>
</Box>
<Flex justify={'space-between'}>
<Box>
<Text variant="heading-md" className={proposalFormTitle}>
{votesAvailable === 0 ? 'Submit Vote' : 'Submit Votes'}
</Text>
<Text variant="paragraph-sm" color="tertiary">
Proposal: {title}
</Text>
</Box>
<Button
variant="ghost"
onClick={() => setShowVoteModal(false)}
p={'x0'}
size="xs"
style={{
// prop padding change padding to 0
padding: 0,
}}
>
<Icon id="cross" />
</Button>
</Flex>

<Formik initialValues={initialValues} onSubmit={handleSubmit}>
{({ values, submitForm, isSubmitting, setFieldValue }) => (
Expand Down

0 comments on commit 5dbde05

Please sign in to comment.