@teko-builder/smart-activation
TypeScript icon, indicating that this package has built-in type declarations

1.0.1-beta.31 • Public • Published

On Site Activation Client Integration

Eager to get started? This quick start guide will help you integrate builder data in client.

yarn add @teko-builder/on-site-react

# or

npm install @teko-builder/on-site-react

Note

Currently

  • Only support component popup banner
  • Save shown state on cookie

Usage

import { lazy, Suspense } from 'react';
import SmartComponent from "@teko-builder/on-site-react";
import "@teko-builder/on-site-react/dist/base.css";

// lazy import
// const SmartComponent = lazy(() => import('@teko-builder/on-site-react));

function App() {
  const showSmartComponent = appId && trackingAppId && iamId;

  return (
    <Suspense fallback={<>Loading</>}>
      {showSmartComponent && (
        <SmartComponent env="dev" configs={{ appId, trackingAppId, iamId, sessionPeriodMinites }} />
      )}
      <AnotherComponent>
    </Suspense>
  );
}

export default App;

API

Picker

Property Type Default Description
env dev | stag | production - environment to apply library
configs SmartComponentConfigs - Configs of smart component

SmartComponentConfigs

Property Type Default Description
iamId string - id of user on IAM system
appId number - App id of Smart Activation Client App
trackingAppId string - id of tracking app
sessionPeriodMinutes number 20 minutes expire time for session

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.1-beta.311latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.1-beta.311
1.0.1-beta.300
1.0.1-beta.290
1.0.1-beta.280
1.0.1-beta.270
1.0.1-beta.260
1.0.1-beta.250
1.0.1-beta.240
1.0.1-beta.230
1.0.1-beta.220
1.0.0-beta.70
1.0.0-beta.60
1.0.0-beta.50
1.0.0-beta.40
1.0.0-beta.30
1.0.0-beta.20
1.0.0-beta.10

Package Sidebar

Install

npm i @teko-builder/smart-activation

Weekly Downloads

1

Version

1.0.1-beta.31

License

MIT

Unpacked Size

29.1 kB

Total Files

31

Last publish

Collaborators

  • luchoang
  • anhducc13
  • hung.nq1