...
Code Block | ||
---|---|---|
| ||
import { ChipInfo } from 'empower-display'; .............. const configChipconfigInfoSingle = { removeIcontitle: 'Info trueTitle', labelinfo: "<p>Lorem 'Chip Label', id: 'chipID', disabled: false, Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>" } /** * * getActions - method that gets the value and data of the component */ const getActions = (value, data) => { console.log('VALUE', value, data) } .............. return ( <> <Chip<Info config={configChipconfigInfoSingle} onChange={e => getActions(e, 'chipinfo')} /> </> ) |
Info Multiple
...
Code Block |
---|
import { Chip } from 'empower-display'; .............. const configChip = { removeIcon: false, label: 'Chip Label', id: 'chipID', disabled: false, } /** * * getActions - method that gets the value and data of the component */ const getActions = (value, data) => { console.log('VALUE', value, data) } .............. return ( <> <Chip config={configChip} onChange={e => getActions(e, 'chip')} /> </> ) |
🔹 Properties
Parent Parameter | Sub Parameter | Data Type | Constraint | Description | ||
---|---|---|---|---|---|---|
removeIcon | Boolean | Required | Sets the visibility of remove icon | |||
label | String | Required | Label inside the chip | |||
id | String | Required | It is added as the chip id. It should be unique | |||
disabled | Boolean | Optional | Disabling the chips almost looks like the remove icon is hidden.config | JSON Object | Required | |
id | String | Required | ||||
type | String | Required | ||||
label | String | Optional | ||||
value | String | Required | ||||
placeholder | String | Optional | ||||
maxLength | Integer | Optional | ||||
readOnly | Boolean | Optional | ||||
required | Boolean | Optional | ||||
disabled | Boolean | Optional | ||||
rows | Boolean | Required | ||||
cols | Boolean | Required | ||||
allowedChar | JSON Object | Optional | ||||
alphabet | Boolean | Optional | ||||
numeric | Boolean | Optional | ||||
space | Boolean | Optional | ||||
allowedSymbols | Array (String) | Optional | ||||
customClass | String | Optional | ||||
onChanged | Event Method | Required |
🔹 References
Repository Link: https://gitlab.com/empowerteams/empower-display.git
...