Never Pay your Mortgage

    shuttl-ui-sdk

    0.0.2-1.exp.3 • Public • Published

    Shuttl UI SDK

    Shuttl's common use UI utilities, types, constants, etc.

    NPM JavaScript Style Guide

    Install

    yarn add shuttl-ui-sdk

    Note:

    Multiple dependencies listed below are optional, and may need to be installed separately depending on the module you're using.

    If you're using the Unified imports approach, they all must be installed separately, depending on whether your build system supports tree-shaking.

    List of possibly required dependencies:

    • react
    • react-dom
    • prop-types
    • axios
    • @material-ui/utils
    • @material-ui/styles
    • @material-ui/core
    • @material-ui/icons

    Usage

    Path imports (JS and TS)

    import { setSentryScope, initSentry, identifyUserOnLogRocket } from 'shuttl-ui-sdk/dist/utils/frontend-tracking';
    import { getUrlParts } from 'shuttl-ui-sdk/dist/utils/dom';
    import { REQUEST_STATE } from 'shuttl-ui-sdk/dist/globals/constants';
    
    // ...
    
    setSentryScope(...);
    identifyUserOnLogRocket(...);
    
    const { domain, subdomain, protocol } = getUrlParts('https://service-panel-frontend.shuttltech.com');
    if (someRequestState === REQUEST_STATE.REQUEST) { ... }

    Unified imports (JS only)

    import { setSentryScope, initSentry, identifyUserOnLogRocket, getUrlParts, REQUEST_STATE } from 'shuttl-ui-sdk';
    
    // ...
    
    setSentryScope(...);
    identifyUserOnLogRocket(...);
    
    const { domain, subdomain, protocol } = getUrlParts('https://service-panel-frontend.shuttltech.com');
    if (someRequestState === REQUEST_STATE.REQUEST) { ... }

    Keywords

    none

    Install

    npm i shuttl-ui-sdk

    DownloadsWeekly Downloads

    7

    Version

    0.0.2-1.exp.3

    License

    MIT

    Unpacked Size

    6.9 MB

    Total Files

    112

    Last publish

    Collaborators

    • pskirann
    • nancy32721
    • jayantbh
    • sainiankit_shuttl