Steven Silvester 5 years ago
parent
commit
8b279140c4

+ 0 - 4
packages/notebook/src/panel.ts

@@ -9,10 +9,6 @@ import { each } from '@lumino/algorithm';
 
 import { Token } from '@lumino/coreutils';
 
-import { Message } from '@lumino/messaging';
-
-import { ISignal, Signal } from '@lumino/signaling';
-
 import {
   ISessionContext,
   Printing,

+ 1 - 0
packages/statusbar/src/index.ts

@@ -7,5 +7,6 @@ export * from './components';
 export * from './defaults';
 export * from './style/statusbar';
 
+export * from './deprecated';
 export * from './statusbar';
 export * from './tokens';

+ 52 - 0
packages/ui-components/src/deprecated.tsx

@@ -0,0 +1,52 @@
+/*-----------------------------------------------------------------------------
+| Copyright (c) Jupyter Development Team.
+| Distributed under the terms of the Modified BSD License.
+|----------------------------------------------------------------------------*/
+
+/* This file is a workaround for 1.0.x versions of Jlab pulling in 1.1.x
+versions of statusbar.
+TODO: delete this file in Jlab 2.0
+*/
+
+import * as React from 'react';
+
+import { classes, style } from 'typestyle/lib';
+
+import { NestedCSSProperties } from 'typestyle/lib/types';
+
+const icon = (): NestedCSSProperties => {
+  return {
+    backgroundRepeat: 'no-repeat',
+    backgroundPosition: 'center',
+    backgroundSize: '18px',
+    minHeight: '24px',
+    width: '20px'
+  };
+};
+
+/**
+ * (DEPRECATED) A namespace for IconItem statics.
+ */
+export namespace IconItem {
+  /**
+   * Props for an IconItem
+   */
+  export interface IProps {
+    /**
+     * A CSS class name for the icon.
+     */
+    source: string;
+  }
+}
+
+/**
+ * (DEPRECATED) A functional tsx component for an icon.
+ */
+export function IconItem(
+  props: IconItem.IProps & React.HTMLAttributes<HTMLDivElement>
+): React.ReactElement<IconItem.IProps> {
+  const { source, className, ...rest } = props;
+  return (
+    <div className={classes(className, source, style(icon()))} {...rest} />
+  );
+}