Choose for me
Generate a source mix for a particular device.
Table of contents
Installation
NPM
npm i @ppci/choose-for-me
Usage
Javascript
import '@ppci/choose-for-me'
Browser
<!-- Default -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci/choose-for-me/builds/index.min.js" />
<!-- Legacy -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci/choose-for-me/builds/legacy.min.js" />
<choose-for-me
deviceId="String"
title="String"
randomLabel="String"
locationLabel="String"
supplyLabel="String"
weightLabel="String"
></choose-for-me>
Properties
Property | Type | Description | Possible Values |
*deviceId* | String | Generate a source mix for this device | |
*title* | String | Title of the button | |
randomLabel | String | Label of random option | Generate randomly |
locationLabel | String | Label of location option | Generate by nearby location |
weightLabel | String | Label of weight option | Generate by weight |
supplyLabel | String | Label of supply option | Generate by supply |