Kana Widget is available as a npm package.
npm i kana-widget
Here is an example of a basic app using Kana Widget:
import Widget from 'kana-widget';
export const WidgetScreen = () => {
return <Widget />;
};
This is the example with all the available configurations:
import Widget from 'kana-widget';
import { useMemo } from 'react';
export const WidgetScreen = () => {
const widgetConfig: WidgetConfig = useMemo(() => {
return {
containerStyle: {
backgroundColor: '#1E1123',
primaryColor: '#130E18',
secondaryColor: '#2c2533',
buttonColor: 'black'
},
};
}, []);
return <Widget config = { widgetConfig }/>;
};
If you are facing any issue like
BREAKING CHANGE: webpack<5 used to include polyfills for node.js core modules by default.
Please add custom webpack settings to config-overrides.js. For further details regarding custom webpack settings refer here.