brightyui
Version:
Brighty UI library
15 lines • 1.68 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import styles from '../../../src/styles/TransactionCell.module.scss';
import Typography from '../Typography/Typography';
import { EColors } from '../../types/EColors';
import Load from '../Load/Load';
import { cnb } from 'cnbuilder';
var TransactionCell = function (_a) {
var title = _a.title, subtitle = _a.subtitle, value = _a.value, subvalue = _a.subvalue, loading = _a.loading, icon = _a.icon, _b = _a.valueColor, valueColor = _b === void 0 ? EColors.text0 : _b, onClick = _a.onClick, crossedValue = _a.crossedValue;
if (loading) {
return (_jsxs("div", { className: styles.root, children: [_jsx(Load, { width: 40, height: 40, radius: 40 }), _jsxs("div", { className: cnb(styles.column, styles.column__loading), children: [_jsx(Load, { width: 48, height: 12 }), _jsx(Load, { width: 96, height: 12 })] }), _jsx("div", { className: cnb(styles.rightColumn, styles.rightColumn__loading), children: _jsx(Load, { width: 48, height: 12 }) })] }));
}
return (_jsxs("button", { className: styles.root, onClick: onClick, children: [icon, _jsxs("div", { className: styles.column, children: [_jsx(Typography, { variant: 'pSmallRegular', children: title }), _jsx(Typography, { variant: 'captionRegular', color: EColors.text2, children: subtitle })] }), _jsxs("div", { className: styles.rightColumn, children: [_jsx(Typography, { variant: 'pSmallRegular', color: valueColor, lineThrough: crossedValue, children: value }), _jsx(Typography, { variant: 'captionRegular', color: EColors.text2, children: subvalue })] })] }));
};
export default TransactionCell;
//# sourceMappingURL=TransactionCell.js.map