Skip to content

Commit

Permalink
refs #893 There's no need for a wrapping box...
Browse files Browse the repository at this point in the history
  • Loading branch information
elboletaire committed Feb 4, 2025
1 parent 787d45a commit d478a46
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/components/Layout/AlertIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AlertIconProps, Box, chakra, useAlertContext, useAlertStyles } from '@chakra-ui/react'
import { AlertIconProps, chakra, useAlertContext, useAlertStyles } from '@chakra-ui/react'
import { cx } from '@chakra-ui/utils'
import { cloneElement } from 'react'
import { FaRegCheckCircle } from 'react-icons/fa'
Expand All @@ -19,19 +19,18 @@ export const AlertIcon = (props: AlertIconProps) => {
const icon = icons[status] || <RiErrorWarningLine />

return (
<Box gridRowStart={1} gridRowEnd={3} display={'flex'} justifyContent={'center'} alignItems={'center'}>
<chakra.span
display='inherit'
data-status={status}
{...props}
className={cx('chakra-alert__icon', props.className)}
__css={css}
{...props}
>
{cloneElement(icon, {
color: css.color,
})}
</chakra.span>
</Box>
<chakra.span
display='inherit'
data-status={status}
alignSelf='center'
{...props}
className={cx('chakra-alert__icon', props.className)}
__css={css}
{...props}
>
{cloneElement(icon, {
color: css.color,
})}
</chakra.span>
)
}

0 comments on commit d478a46

Please sign in to comment.