@tap-payments/os-micro-frontend-shared 0.1.358 → 0.1.359
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,15 +12,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import camelCase from 'lodash/camelCase';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useTheme } from '@mui/material/styles';
|
|
15
16
|
import Tooltip from '../../../Tooltip';
|
|
16
17
|
import { TableCell } from '../../../TableCells';
|
|
17
18
|
import { payoutStatusIcons } from './constant';
|
|
18
19
|
import { StatusCellContainer, StatusIconWrapper, StatusIcon } from '../style';
|
|
19
20
|
function PayoutStatusCell(_a) {
|
|
20
|
-
var { payoutStatus } = _a, props = __rest(_a, ["payoutStatus"]);
|
|
21
|
+
var { payoutStatus = 'PAID_OUT' } = _a, props = __rest(_a, ["payoutStatus"]);
|
|
21
22
|
const { t } = useTranslation();
|
|
23
|
+
const theme = useTheme();
|
|
22
24
|
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StatusCellContainer, { children: _jsx(StatusIconWrapper, Object.assign({ className: "payout-status", style: {
|
|
23
25
|
visibility: 'visible',
|
|
24
|
-
|
|
26
|
+
width: '36px',
|
|
27
|
+
borderRadius: '23.1px',
|
|
28
|
+
backgroundColor: theme.palette.common.white,
|
|
29
|
+
border: `1.029px solid ${theme.palette.divider}`,
|
|
30
|
+
} }, { children: payoutStatus && payoutStatusIcons[payoutStatus] && (_jsx(Tooltip, Object.assign({ title: t(camelCase(payoutStatus)) }, { children: _jsx(StatusIcon, { src: payoutStatusIcons[payoutStatus], alt: "settled-icon", style: { width: '16px', height: '16px', objectFit: 'contain' } }) }))) })) }) })));
|
|
25
31
|
}
|
|
26
32
|
export default PayoutStatusCell;
|
|
@@ -117,21 +117,19 @@ export const StatusCellContainer = styled('span')(({ theme }) => ({
|
|
|
117
117
|
justifyContent: 'flex-start',
|
|
118
118
|
gap: theme.spacing(1),
|
|
119
119
|
}));
|
|
120
|
-
export const StatusIconWrapper = styled('span')((
|
|
121
|
-
width: '
|
|
120
|
+
export const StatusIconWrapper = styled('span')(() => ({
|
|
121
|
+
width: '24px',
|
|
122
122
|
height: '24px',
|
|
123
|
-
borderRadius: '
|
|
124
|
-
backgroundColor:
|
|
125
|
-
border: `1.029px solid ${theme.palette.divider}`,
|
|
123
|
+
borderRadius: '50%',
|
|
124
|
+
backgroundColor: 'transparent',
|
|
126
125
|
display: 'flex',
|
|
127
126
|
alignItems: 'center',
|
|
128
127
|
justifyContent: 'center',
|
|
129
128
|
flexShrink: 0,
|
|
130
129
|
}));
|
|
131
130
|
export const StatusIcon = styled('img')(() => ({
|
|
132
|
-
width: '
|
|
133
|
-
height: '
|
|
134
|
-
objectFit: 'contain',
|
|
131
|
+
width: '36px',
|
|
132
|
+
height: '24px',
|
|
135
133
|
}));
|
|
136
134
|
export const PiePercentage = styled('div')(({ percentage, isCapture, theme }) => ({
|
|
137
135
|
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}%, transparent 0.00%)`,
|
package/package.json
CHANGED