forked from jupyterlab/jupyterlab
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
f8642d9
commit 0d59934
Showing
5 changed files
with
74 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
}; | ||
}; | ||
|
||
/** | ||
* A namespace for IconItem statics. | ||
*/ | ||
export namespace IconItem { | ||
/** | ||
* Props for an IconItem | ||
*/ | ||
export interface IProps { | ||
/** | ||
* A CSS class name for the icon. | ||
*/ | ||
source: string; | ||
} | ||
} | ||
|
||
/** | ||
* 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} /> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters