@digital-ai/k6i-insight-components
v1.8.1
Published
[![](https://img.shields.io/static/v1?label=release&message=click%20to%20start&color=red&style=flat-square&logo=semantic-release)](https://github.com/digital-ai/k6i-insight-components/compare/master...develop?expand=1&template=release.md) [![](https://img
Downloads
340
Keywords
Readme
@digital-ai/k6i-insight-components
Installation
yarn add @digital-ai/k6i-insight-components
Usage
As k6i-insight-components
uses dot-components under the hood, you need to wrap
your application with the VsThemeProvider
as:
import { VsThemeProvider } from '@digital-ai/k6i-insight-components';
<VsThemeProvider>
<App />
</VsThemeProvider>;
VsThemeProvider
wraps DotThemeProvider
and adds more theme properties needed for our own components.
More details about DotThemeProvider
can be found here
Using this library with IE11
:warning: As of today this library is not transpiled to ES5, the output build is in ESM format with some ESNext features
If you have to support IE11 you will have to transpile this library, this can be done via babel and webpack5 as:
// ... your webpack config
target: ['web', 'es5'],
// Rules of how webpack will take our files, complie & bundle them for the browser
module:{
rules: [
{
test: /\.(js|jsx)$/,
exclude: {
and: [/node_modules/], // Exclude libraries in node_modules ...
not: [
// Except for a few of them that needs to be transpiled because they use modern syntax
/vs-components/
]
},
use: {
loader: 'babel-loader'
}
},
// more rules
]
}
// more configuration
And the babel configuration on babel.config.json
:
{
"presets":
[
[
"@babel/preset-env",
{
"corejs": {
"version": 3.14,
"proposals": true
},
"useBuiltIns": "entry"
}
],
"@babel/preset-react"
]
}
Contributing
See our CONTRIBUTING section for more info about development and internal processes.
License
All materials included in this package are subject to your existing commercial license or subscription agreement terms with Digital.ai Software Inc. or its Affiliates.