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

127 lines (126 loc) 3.54 kB
import { __assign } from "tslib"; import styles from '../styles'; import { theme } from '../utils/theme'; var categoryItem = { categoryItem: { classes: '', props: {}, style: { alignItems: 'stretch', flexBasis: '33.33333%', padding: theme.spacing.padding.small, position: 'relative' } }, categoryItem__soldOut: { classes: '', props: {}, style: { position: 'absolute', zIndex: 3, bottom: theme.spacing.padding.small, left: theme.spacing.padding.small, right: theme.spacing.padding.small, top: theme.spacing.padding.small, borderRadius: 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: __assign(__assign({}, styles.textBody), { color: theme.colors.background.primary, fontSize: theme.fontSizes.xlarge, position: 'relative', textTransform: 'uppercase', letterSpacing: 2, zIndex: 3 }) }, categoryItem__button: { classes: '', props: {}, style: { alignItems: 'stretch', backgroundColor: theme.colors.card.primary, borderRadius: theme.spacing.borderRadius.small, display: 'flex', flexDirection: 'column', flexGrow: 1, overflow: 'hidden', boxShadow: 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: __assign(__assign({}, styles.textHeading), { fontSize: theme.fontSizes.medium }) }, categoryItem__details: { classes: '', props: {}, style: { alignItems: 'center', flexDirection: 'row', gap: 10, marginTop: 8 } }, categoryItem__price: { classes: '', props: {}, style: __assign(__assign({}, styles.textHeading), { fontSize: theme.fontSizes.xsmall, lineHeight: 1 }) }, categoryItem__calories: { classes: '', props: {}, style: __assign(__assign({}, styles.textBody), { fontSize: theme.fontSizes.xsmall, lineHeight: 1 }) } }; export default categoryItem;