Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add close corner button #395

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading