0.0.2-1.exp.3 • Published 3 years ago
shuttl-ui-sdk v0.0.2-1.exp.3
Shuttl UI SDK
Shuttl's common use UI utilities, types, constants, etc.
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) { ... }
0.0.2-1.exp.3
3 years ago
0.0.21
4 years ago
0.0.2-1.exp.1
4 years ago
0.0.2-1.exp.2
4 years ago
0.0.20
4 years ago
0.0.19
4 years ago
0.0.16
4 years ago
0.0.17
4 years ago
0.0.18
4 years ago
0.0.15
4 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago