Skip to content

Commit

Permalink
fix close icons in dialog and toast
Browse files Browse the repository at this point in the history
  • Loading branch information
TateB committed Feb 13, 2023
1 parent b52ad8d commit 566bcfa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
14 changes: 7 additions & 7 deletions components/src/components/organisms/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import styled, { css } from 'styled-components'

import { AlertSVG, CrossCircleSVG, EthSVG } from '@/src'
import { AlertSVG, CrossSVG, EthSVG } from '@/src'
import { mq } from '@/src/utils/responsiveHelpers'

import { WithAlert } from '@/src/types'
Expand All @@ -11,9 +11,8 @@ import { Modal, Typography } from '../..'
const IconCloseContainer = styled.button(
({ theme }) => css`
position: absolute;
top: ${theme.space['1']};
right: ${theme.space['1']};
padding: ${theme.space['3']};
top: ${theme.space['3']};
right: ${theme.space['3']};
color: ${theme.colors.greyPrimary};
cursor: pointer;
transition-property: all;
Expand All @@ -26,8 +25,9 @@ const IconCloseContainer = styled.button(
svg {
display: block;
width: ${theme.space['6']};
height: ${theme.space['6']};
width: ${theme.space['9']};
height: ${theme.space['9']};
padding: ${theme.space['1.5']};
}
`,
)
Expand Down Expand Up @@ -340,7 +340,7 @@ const ModalWithTitle = ({

const CloseButton = ({ onClick }: { onClick: () => void }) => (
<IconCloseContainer data-testid="close-icon" onClick={onClick}>
<CrossCircleSVG />
<CrossSVG />
</IconCloseContainer>
)

Expand Down
13 changes: 7 additions & 6 deletions components/src/components/organisms/Toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ import styled, { css, useTheme } from 'styled-components'

import { Space } from '@/src'

import { Backdrop, ExitSVG, Typography } from '../..'
import { Backdrop, CrossSVG, Typography } from '../..'
import { getTestId } from '../../../utils/utils'

const IconCloseContainer = styled.div(
const IconCloseContainer = styled.svg(
({ theme }) => css`
position: absolute;
top: ${theme.space['2.5']};
right: ${theme.space['2.5']};
height: ${theme.space['8']};
width: ${theme.space['8']};
width: ${theme.space['9']};
height: ${theme.space['9']};
padding: ${theme.space['1.5']};
opacity: 0.5;
cursor: pointer;
transition-property: all;
Expand Down Expand Up @@ -168,7 +169,7 @@ const DesktopToast = ({
$top={top}
>
<IconCloseContainer
as={ExitSVG}
as={CrossSVG}
data-testid="toast-close-icon"
onClick={() => onClose()}
/>
Expand Down Expand Up @@ -330,7 +331,7 @@ export const TouchToast = ({
<>
{children && <ActionWrapper>{children}</ActionWrapper>}
<IconCloseContainer
as={ExitSVG}
as={CrossSVG}
data-testid="toast-close-icon"
onClick={(e: React.MouseEvent<SVGSVGElement, MouseEvent>) => {
e.stopPropagation()
Expand Down

0 comments on commit 566bcfa

Please sign in to comment.