@popmenu/ordering-ui 0.99.1 → 0.100.0

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.
@@ -32,4 +32,6 @@ export interface MenuItemProps {
32
32
  available: boolean;
33
33
  /** Renders out of stock tag */
34
34
  isOutOfStock?: Maybe<boolean>;
35
+ /** Renders the featured tag when true */
36
+ isFeatured?: Maybe<boolean>;
35
37
  }
@@ -4,7 +4,7 @@ export interface StatusTagProps {
4
4
  /** Renders the message of the tag */
5
5
  label: string;
6
6
  /** Renders the color of the tag */
7
- color: 'default' | 'error' | 'warning';
7
+ color: 'default' | 'error' | 'warning' | 'highlight';
8
8
  /** Changes the padding sizes */
9
9
  size?: 'md' | 'sm';
10
10
  }
package/build/index.es.js CHANGED
@@ -1374,6 +1374,10 @@ var useStatusTagStyles = makeStyles(function (theme) { return ({
1374
1374
  borderColor: theme.palette.error.main,
1375
1375
  color: theme.palette.error.main,
1376
1376
  },
1377
+ highlight: {
1378
+ backgroundColor: theme.palette.warning.light,
1379
+ color: theme.palette.grey[900],
1380
+ },
1377
1381
  }); });
1378
1382
 
1379
1383
  var classnames = {exports: {}};
@@ -1449,7 +1453,7 @@ StatusTag.defaultProps = {
1449
1453
  StatusTag.displayName = 'StatusTag';
1450
1454
 
1451
1455
  var MenuItem = forwardRef(function (props, ref) {
1452
- var onClick = props.onClick, id = props.id, description = props.description, isOutOfStock = props.isOutOfStock, title = props.title, loading = props.loading;
1456
+ var onClick = props.onClick, id = props.id, description = props.description, isOutOfStock = props.isOutOfStock, title = props.title, loading = props.loading, isFeatured = props.isFeatured;
1453
1457
  var classes = useMenuItemStyles(props);
1454
1458
  var handleClick = function (event) {
1455
1459
  onClick(id, event);
@@ -1457,6 +1461,7 @@ var MenuItem = forwardRef(function (props, ref) {
1457
1461
  return (React__default.createElement(Card, { className: classes.card, ref: ref, elevation: 0, "data-component-type": "menu-item" },
1458
1462
  React__default.createElement(CardActionArea, { className: classes.cardActionArea, onClick: handleClick, disabled: loading },
1459
1463
  React__default.createElement(MenuItemInfo, null,
1464
+ isFeatured && React__default.createElement(StatusTag, { color: "highlight", label: "Featured", variant: "outlined", size: "sm" }),
1460
1465
  React__default.createElement(Box, { display: "flex", gridGap: 8, alignItems: "center" },
1461
1466
  React__default.createElement(Typography$1, { className: classes.cardTitle }, loading ? React__default.createElement(Skeleton, null) : title),
1462
1467
  isOutOfStock && React__default.createElement(StatusTag, { color: "warning", label: "Out of stock", variant: "outlined", size: "sm" })),