@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
69 lines • 2.24 kB
JavaScript
var _Icon, _Icon2;
import React from 'react';
import { Icon } from '@iconify/react';
import { Grid, IconButton } from '@mui/material';
import { Card } from './styled';
import { NumberOutput } from '../../components/NumberOutput';
import { TextForLinesOutput } from '../../components/TextForLinesOutput';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export var CardPurchase = function CardPurchase(_ref) {
var title = _ref.title,
subTitle = _ref.subTitle,
_ref$number = _ref.number,
number = _ref$number === void 0 ? 0 : _ref$number,
setNumber = _ref.setNumber;
return /*#__PURE__*/_jsx(Card, {
children: /*#__PURE__*/_jsxs(Grid, {
container: true,
direction: "row",
alignItems: "center",
children: [/*#__PURE__*/_jsxs(Grid, {
container: true,
direction: "column",
xs: true,
children: [/*#__PURE__*/_jsx(Grid, {
item: true,
xs: true,
children: /*#__PURE__*/_jsx(TextForLinesOutput, {
clines: 1,
text: title
})
}), /*#__PURE__*/_jsx(Grid, {
item: true,
xs: true,
children: /*#__PURE__*/_jsx(TextForLinesOutput, {
clines: 1,
text: subTitle
})
})]
}), /*#__PURE__*/_jsx(Grid, {
container: true,
xs: true,
justifyContent: "flex-end",
children: /*#__PURE__*/_jsxs(Grid, {
item: true,
sx: {
backgroundColor: '#fff'
},
children: [/*#__PURE__*/_jsx(IconButton, {
onClick: function onClick() {
return setNumber && setNumber(number - 1);
},
children: _Icon || (_Icon = /*#__PURE__*/_jsx(Icon, {
icon: "subway:subtraction-1"
}))
}), /*#__PURE__*/_jsx(NumberOutput, {
number: number
}), /*#__PURE__*/_jsx(IconButton, {
onClick: function onClick() {
return setNumber && setNumber(number + 1);
},
children: _Icon2 || (_Icon2 = /*#__PURE__*/_jsx(Icon, {
icon: "ant-design:plus-outlined"
}))
})]
})
})]
})
});
};