UNPKG

@open-tender/store

Version:

A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API

129 lines (128 loc) 3.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var styles_1 = tslib_1.__importDefault(require("../styles")); var theme_1 = require("../utils/theme"); var categoryItem = { categoryItem: { classes: '', props: {}, style: { alignItems: 'stretch', flexBasis: '33.33333%', padding: theme_1.theme.spacing.padding.small, position: 'relative' } }, categoryItem__soldOut: { classes: '', props: {}, style: { position: 'absolute', zIndex: 3, bottom: theme_1.theme.spacing.padding.small, left: theme_1.theme.spacing.padding.small, right: theme_1.theme.spacing.padding.small, top: theme_1.theme.spacing.padding.small, borderRadius: theme_1.theme.spacing.borderRadius.small, alignItems: 'stretch', overflow: 'hidden' } }, categoryItem__soldOutContainer: { classes: '', props: {}, style: { alignItems: 'center', flexGrow: 1, justifyContent: 'center', position: 'relative' } }, categoryItem__soldOutOverlay: { classes: '', props: {}, style: { position: 'absolute', zIndex: 2, bottom: 0, left: 0, right: 0, top: 0, backgroundColor: '#000000', opacity: 0.5 } }, categoryItem__soldOutTitle: { classes: '', props: { text: 'Out of Stock' }, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textBody), { color: theme_1.theme.colors.background.primary, fontSize: theme_1.theme.fontSizes.xlarge, position: 'relative', textTransform: 'uppercase', letterSpacing: 2, zIndex: 3 }) }, categoryItem__button: { classes: '', props: {}, style: { alignItems: 'stretch', backgroundColor: theme_1.theme.colors.card.primary, borderRadius: theme_1.theme.spacing.borderRadius.small, display: 'flex', flexDirection: 'column', flexGrow: 1, overflow: 'hidden', boxShadow: theme_1.theme.colors.boxShadow.primary } }, categoryItem__image: { classes: '', props: {}, style: { aspectRatio: 1.5, backgroundPosition: 'center', backgroundSize: 'cover' } }, categoryItem__content: { classes: '', props: {}, style: { flexBasis: 'auto', flexGrow: 1, flexShrink: 1, paddingBottom: 15, paddingLeft: 12, paddingRight: 12, paddingTop: 12, textAlign: 'left' } }, categoryItem__title: { classes: '', props: { as: 'h2' }, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textHeading), { fontSize: theme_1.theme.fontSizes.medium }) }, categoryItem__details: { classes: '', props: {}, style: { alignItems: 'center', flexDirection: 'row', gap: 10, marginTop: 8 } }, categoryItem__price: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textHeading), { fontSize: theme_1.theme.fontSizes.xsmall, lineHeight: 1 }) }, categoryItem__calories: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textBody), { fontSize: theme_1.theme.fontSizes.xsmall, lineHeight: 1 }) } }; exports.default = categoryItem;