Skip to content

Commit

Permalink
Merge pull request #395 from jordanlesich/modalClickAway
Browse files Browse the repository at this point in the history
add close corner button
  • Loading branch information
jordanlesich authored Oct 23, 2023
2 parents f570420 + 86ad5c0 commit bbb2e78
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 does not change padding to 0
padding: 0,
}}
>
<Icon id="cross" />
</Button>
</Flex>

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

2 comments on commit bbb2e78

@vercel
Copy link

@vercel vercel bot commented on bbb2e78 Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

testnet-nouns-builder – ./apps/web

testnet-nouns-builder-git-main-nouns-builder.vercel.app
testnet.nouns.build
testnet-nouns-builder-nouns-builder.vercel.app

@vercel
Copy link

@vercel vercel bot commented on bbb2e78 Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.