|
1 | 1 | import { FC, ReactNode } from 'react' |
2 | | -import Box from '@mui/material/Box' |
3 | | -import Typography from '@mui/material/Typography' |
4 | | -import { styled } from '@mui/material/styles' |
| 2 | +import { Typography } from '@oasisprotocol/ui-library/src/components/typography' |
5 | 3 | import ReportProblemIcon from '@mui/icons-material/ReportProblem' |
6 | 4 | import { COLORS } from '../../../styles/theme/colors' |
7 | 5 |
|
8 | | -const StyledBox = styled(Box)(({ theme }) => ({ |
9 | | - display: 'flex', |
10 | | - flexDirection: 'column', |
11 | | - justifyContent: 'center', |
12 | | - alignItems: 'center', |
13 | | - flex: 1, |
14 | | - gap: theme.spacing(4), |
15 | | - textAlign: 'center', |
16 | | - [theme.breakpoints.down('sm')]: { |
17 | | - padding: theme.spacing(5, 2, 6), |
18 | | - }, |
19 | | - [theme.breakpoints.up('sm')]: { |
20 | | - padding: theme.spacing(6, 4, 7), |
21 | | - }, |
22 | | -})) |
23 | | - |
24 | 6 | type CardEmptyStateProps = { |
25 | 7 | label: string |
26 | 8 | action?: ReactNode |
27 | 9 | } |
28 | 10 |
|
29 | 11 | export const CardEmptyState: FC<CardEmptyStateProps> = ({ label, action }) => ( |
30 | | - <StyledBox> |
| 12 | + <div className="flex flex-col justify-center items-center flex-1 gap-3 text-center px-1 pt-8 pb-16 sm:px-4 sm:pt-16 sm:pb-32"> |
31 | 13 | <ReportProblemIcon sx={{ color: COLORS.warningColor, fontSize: '60px' }} /> |
32 | | - <Typography |
33 | | - sx={{ |
34 | | - color: COLORS.grayDark, |
35 | | - display: 'block', |
36 | | - alignItems: 'center', |
37 | | - verticalAlign: 'middle', |
38 | | - }} |
39 | | - > |
| 14 | + <Typography className="block align-middle text-gray-700"> |
40 | 15 | {label} |
41 | 16 | {action} |
42 | 17 | </Typography> |
43 | | - </StyledBox> |
| 18 | + </div> |
44 | 19 | ) |
0 commit comments