@datalayer/core
Version:
[](https://datalayer.io)
70 lines (69 loc) • 1.82 kB
TypeScript
import { ReactElement, ReactNode } from 'react';
import { ISessionContext } from '@jupyterlab/apputils';
import { ITranslator } from '@jupyterlab/translation';
import { IRuntimeDesc } from '../../models';
import { IMultiServiceManager } from '../../stateful/runtimes';
type IDisplayMode = 'menu' | 'radio';
/**
* {@link RuntimePickerBase} properties
*/
export interface IRuntimePickerBaseProps {
/**
* The display mode.
*/
display: IDisplayMode;
/**
* Additional actions items to be placed at the top of the picker
*/
preActions?: ReactNode;
/**
* Additional actions items to be placed at the bottom of the picker
*/
postActions?: ReactNode;
/**
* Whether the picker is disabled or not.
*/
disabled?: boolean;
/**
* Runtime description passing this filter function will be displayed.
*/
filterRuntime?: (desc: IRuntimeDesc) => boolean;
/**
* Session preference.
*/
preference?: {
id?: string;
kernelDisplayName?: string;
language?: string;
location?: string;
};
/**
* Runtime description.
*/
runtimeDesc?: IRuntimeDesc;
/**
* Set runtime description.
*/
setRuntimeDesc: (desc?: IRuntimeDesc) => void;
/**
* Document session context.
*/
sessionContext?: ISessionContext;
/**
* Application service manager
*/
multiServiceManager: IMultiServiceManager;
/**
* Application translator.
*/
translator?: ITranslator;
/**
* Change the look depending on the menu integration.
*/
variant?: 'document' | 'cell';
}
/**
* Base Kernel Picker component.
*/
export declare function RuntimePickerBase(props: IRuntimePickerBaseProps): ReactElement;
export default RuntimePickerBase;