Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

🔹 Description

Related activities is a component that displays the related activity of the main content that have badge, description, status and timestamp.

🔹System Dependencies

🔹 Installation

The package can be installed via npm:

npm install empower-display --save

🔹 Related Activities Base Configuration

Configuration

import { NavTab } from 'empower-display';

..............

  const activities = [
        {
            badge: SVG_BADGE_APPROVE,
            status: 'approved',
            desc: 'Desc 1',
            date: 'date here',
        },
        {
            badge: SVG_BADGE_PENDING,
            status: 'pending',
            desc: 'Desc 2',
            date: 'date here',
        }
    ];
    
    /**
     * 
     * getActions - method that gets the value and data of the component
     */

    const getActions = (value, data) => {
        console.log('VALUE', value, data)
    }
    
..............

  return (
    <>
      <RelatedActivities activities={activities} onChange={(action, data) => getActions(action, data)} />
    </>
  )

🔹  Properties

Parameter

Data Type

Constraint

Description

activities

Array

Required

Display the data from the object inside the array
badge = SVG
desc = String
status = String
date = String

🔹 References

Repository Link: https://bitbucket.org/empowerteams/empower-display

NPM Package: https://www.npmjs.com/package/empower-display

Demo Repo: git@bitbucket.org:empowerteams/mfe-sub-application-template.git

  • No labels