Skip to content

Commit

Permalink
feat: change popover z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
Расул authored and Расул committed Nov 1, 2023
1 parent 9239e72 commit a4b15d1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/components/common/ConfirmPopover/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Popover, { PopoverOrigin } from '@mui/material/Popover'
import React, { useState } from 'react'
import styled from 'styled-components'
import { Flex } from '../Flex'
import { Button } from '~/components/Button'
import { Text } from '~/components/common/Text'
import { colors } from '~/utils/colors'
import { Button } from '~/components/Button'
import { Flex } from '../Flex'

type ConfirmPopoverProps = {
message: string
Expand Down Expand Up @@ -45,7 +45,7 @@ const ConfirmPopover: React.FC<ConfirmPopoverProps> = ({
return (
<>
<div>{React.cloneElement(children, { onClick: handleOpen })}</div>
<Popover
<StyledPopover
anchorEl={anchorEl}
anchorOrigin={anchorOrigin}
onClose={handleClose}
Expand All @@ -63,7 +63,7 @@ const ConfirmPopover: React.FC<ConfirmPopoverProps> = ({
</Button>
</Flex>
</Wrapper>
</Popover>
</StyledPopover>
</>
)
}
Expand All @@ -72,6 +72,7 @@ const Wrapper = styled(Flex)`
background: ${colors.headerBackground};
color: ${colors.white};
padding: 16px 8px;
z-index: 100000;
.secondary {
margin-left: 8px;
Expand All @@ -80,4 +81,10 @@ const Wrapper = styled(Flex)`
}
`

const StyledPopover = styled(Popover)`
&& {
z-index: 9999;
}
`

export default ConfirmPopover

0 comments on commit a4b15d1

Please sign in to comment.