card_facade_badges

A text chip with an optional icon, which will be displayed on the facades of cards.

iframe in the card

Function argument - an object that provides all available functions of the web SDK.

Return value - the function should return array object with the following keys:

KeyTypeDescription
textrequiredstringChip text
colorenumChip color
green
green badge
red
red badge
orange
orange badge
undefined(default color)
default badge
iconstringThe URL of the icon that will be displayed to the left of the text.
badge with url

Example :

'card_facade_badges': async (context) => {
  const timerStartTime = await context.getData('card', 'private', 'timerStartTime');

  if (!timerStartTime) {
    return {
      text: 'πŸ”΄timer is off',
      color: 'red',
    }
  }

  return {
    text: '🟒 timer is on',
    color: 'green',
  }
},
logo
Kaiten
If you have any questions or need help with integration feel free to write us at support@kaiten.io