Skip to content

Commit 55facea

Browse files
authored
@W-18672733@ Chakra v3 - Checkout page alert follow up (#2756)
* Fix alert * Adjust alert * Lint
1 parent 269bff1 commit 55facea

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/pages/checkout/index.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
import React, {useEffect, useState} from 'react'
88
import {FormattedMessage, useIntl} from 'react-intl'
9-
import {Alert, AlertIcon, Box, Button, Container, Grid, GridItem, Stack} from '@chakra-ui/react'
9+
import {Alert, Box, Button, Container, Grid, GridItem, Stack} from '@chakra-ui/react'
1010
import useNavigation from '../../hooks/use-navigation'
1111
import {CheckoutProvider, useCheckout} from '../../pages/checkout/util/checkout-context'
1212
import ContactInfo from '../../pages/checkout/partials/contact-info'
@@ -23,6 +23,7 @@ import {API_ERROR_MESSAGE, TOAST_MESSAGE_REMOVED_ITEM_FROM_CART} from '../../con
2323
import useToast from '../../hooks/use-toast'
2424
import {useExtensionConfig} from '../../hooks'
2525
import LoadingSpinner from '../../components/loading-spinner'
26+
import {AlertIcon} from '../../components/icons'
2627

2728
const Checkout = () => {
2829
const {formatMessage} = useIntl()
@@ -73,10 +74,12 @@ const Checkout = () => {
7374
<GridItem>
7475
<Stack gap={4}>
7576
{error && (
76-
<Alert status="error" variant="left-accent">
77-
<AlertIcon />
78-
{error}
79-
</Alert>
77+
<Alert.Root status="error" colorPalette="red">
78+
<Alert.Indicator>
79+
<AlertIcon color="red.500" boxSize={4} />
80+
</Alert.Indicator>
81+
<Alert.Description>{error}</Alert.Description>
82+
</Alert.Root>
8083
)}
8184

8285
<ContactInfo

0 commit comments

Comments
 (0)