@kvaser/canking-api
Version:
CanKing API to communicate with the CanKing service using Node.js.
50 lines (49 loc) • 1.48 kB
TypeScript
/**
* This module includes CanKing data provider React components.
* The CanKingDataProvider component is needed to be at the root of the component tree to
* make it possible to use the CanKing UI Controls.
*
* @example
* ```tsx
* const container = document.getElementById('root') as HTMLElement;
* const root = createRoot(container);
* root.render(
* <React.StrictMode>
* <CanKingDataProvider>
* <App />
* </CanKingDataProvider>
* </React.StrictMode>,
* );
* ```
*
* @packageDocumentation
*/
import React, { JSX } from 'react';
import { IUserSettings } from '../models';
/**
* Creates a data provider to access CanKing data.
* The CanKingDataProvider component is needed to be at the root of the component tree to
* make it possible to use the CanKing UI Controls.
*
* @example
* ```tsx
* const container = document.getElementById('root') as HTMLElement;
* const root = createRoot(container);
* root.render(
* <React.StrictMode>
* <CanKingDataProvider>
* <App />
* </CanKingDataProvider>
* </React.StrictMode>,
* );
* ```
*
* @param props - Component properties.
* @returns The CanKingDataProvider React component.
*/
declare const CanKingDataProvider: ({ initialUserSettings, children, }: {
initialUserSettings?: IUserSettings;
children?: React.ReactNode;
}) => JSX.Element;
export { UserSettingsContext, WorkspacePanesContext } from './CanKingDataContexts';
export default CanKingDataProvider;