-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathindex.jsx
More file actions
37 lines (32 loc) · 1.05 KB
/
index.jsx
File metadata and controls
37 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import React from 'react'
import {useIntl} from 'react-intl'
// Components
import {Alert, Flex} from '@chakra-ui/react'
// Icons
import {AlertIcon} from '../../components/icons'
/**
* A banner component that displays when the user is offline.
*/
const OfflineBanner = ({...props}) => {
const intl = useIntl()
return (
<Alert.Root status="warning" colorPalette="blue" {...props}>
<Flex align="center">
<AlertIcon mr={2} />
<Alert.Title>
{intl.formatMessage({
id: 'offline_banner.description.browsing_offline_mode',
defaultMessage: "You're currently browsing in offline mode"
})}
</Alert.Title>
</Flex>
</Alert.Root>
)
}
export default OfflineBanner