0.0.4 • Published 4 years ago
@menucloud/mc-menus v0.0.4
@menucloud/mc-menus
This is an embeddeable webcomponent to be used for rendering publishedMenus from menucloud dashboard on other websites.
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
apiKey | api-key | string | undefined | |
beta | beta | boolean | undefined | |
dev | dev | boolean | undefined | |
local | local | boolean | undefined | |
menus | -- | string[] | undefined | |
restaurantId | restaurant-id | string | undefined |
Using this component
Script tag
- Publish to NPM
- Put a script tag similar to this
<script src='https://unpkg.com/@menucloud/mc-menus@0.0.1/dist/mc-menus.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
Node Modules
- Run
npm install @menucloud/mc-menus --save
- Put a script tag similar to this
<script src='node_modules/@menucloud/mc-menus/dist/mc-menus.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
In a stencil-starter app
- Run
npm install @menucloud/mc-menus --save
- Add an import to the npm packages
import @menucloud/mc-menus;
- Then you can use the element anywhere in your template, JSX, html etc
Use in Vue
- Follow this offical guide. https://stenciljs.com/docs/vue
Code sample
<mc-menu
restaurant-id=""
menus="[]"
api-key=""
dev
></mc-menu>