1.1.8 • Published 1 year ago

raydiant-menu v1.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Codeship Status for mirainc/raydiant-menu Netlify Status

Raydiant's React Menu component library for the Raydiant Menu apps.

How to use

1. Install raydiant-menu

yarn add raydiant-menu

IMPORTANT Make sure you are using react@16.8.0

2. Add Menu Properties

Your getProperties.js should look like this

import getMenuProperties from 'raydiant-menu/properties';

export default ({ presentation }) => {
  return {
    // your other props here
    ...getMenuProperties(presentation),
    duration: PropTypes.number('duration').min(5).default(120).helperText('time in seconds.'),
  };
};

Your App presentation will have more props

presentation: {
  values: {
    // other props
    ...
    // props from getMenuProperties
    shouldFormatPrice, // boolean
    currency, // string
    priceFormat, // string
    layout, // 'default' | 'flip'
    image, // { url: string }
    enableAnimation, // boolean
    footnote, // string
    footnoteSize, // 'small' | 'medium' | 'large'
    qrActive, // boolean
    qrSource, // 'needQRCode' | 'haveQRCode'
    qrUrlContent, // string
    qrImage, // { url: string }
    qrSize, // 'small' | 'medium' | 'large'
    qrCallToAction, // string
  },
  theme, // theme object from raydiant-kit PropTypes.theme
}

3. Render MenuLayout

// App.jsx
import MenuLayout from 'raydiant-menu';

const App ({
  presentation,
  isPlaying,
  isThumbnail,
  onReady,
  onError,
}) => {
  const categories = [...]; // App decides which content to be shown
  config = {
    pricingUpdatingInterval: 1000, // optional, if provided, refresh prices every [pricingUpdatingInterval] miliseconds
  };

  return (
    <MenuLayout
      categories={categories}
      presentation={presentation}
      isPlaying={isPlaying}
      isThumbnail={isThumbnail}
      onReady={onReady}
      onError={onError}
      config={}
    />
  );
}
0.0.126

1 year ago

0.0.125

1 year ago

0.0.124

1 year ago

0.0.123

1 year ago

0.0.122

1 year ago

0.0.121

1 year ago

0.0.119

1 year ago

0.0.117

1 year ago

0.0.116

1 year ago

0.0.115

1 year ago

0.0.114

1 year ago

0.0.118

1 year ago

0.0.112

1 year ago

0.0.111

1 year ago

0.0.110

1 year ago

0.0.107

1 year ago

0.0.106

1 year ago

0.0.105

1 year ago

0.0.104

1 year ago

0.0.103

1 year ago

0.0.101

1 year ago

0.0.100

1 year ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.27

2 years ago

1.2.28

2 years ago

1.2.29

2 years ago

1.2.30

2 years ago

1.2.31

2 years ago

1.2.34

2 years ago

1.2.35

2 years ago

1.2.32

2 years ago

1.2.33

2 years ago

1.2.36

2 years ago

1.2.37

2 years ago

1.2.18

3 years ago

1.2.19

3 years ago

1.2.20

3 years ago

1.2.24

3 years ago

1.2.21

3 years ago

1.2.22

3 years ago

1.2.25

3 years ago

1.2.26

3 years ago

0.0.1-test1

3 years ago

0.0.1-test2

3 years ago

1.2.16

3 years ago

1.2.21-canary.3

3 years ago

1.2.17

3 years ago

1.2.21-canary.1

3 years ago

1.2.15

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.9

3 years ago

1.2.13

3 years ago

1.2.10

3 years ago

1.2.11

3 years ago

1.2.14

3 years ago

1.2.6

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1-test-1

3 years ago

1.2.1-test-2

3 years ago

1.2.3-test-1

3 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago