From a3cc1ba4e1603e447f2c59ca76fed55f6840cb98 Mon Sep 17 00:00:00 2001 From: telamonian Date: Mon, 25 Feb 2019 08:03:52 -0500 Subject: [PATCH] All svg formatting is fixed and at parity with master Still need to expose the remaining non-theme svgs --- packages/application/style/images.css | 9 ++-- packages/notebook/style/not-trusted-icon.svg | 6 +-- packages/notebook/style/trusted-icon.svg | 4 +- packages/statusbar/src/components/icon.tsx | 14 ------ .../statusbar/src/components/lineForm.tsx | 49 +++++++++++++++++++ packages/statusbar/src/defaults/lineCol.tsx | 19 +++---- packages/statusbar/src/style/lineForm.ts | 35 ++++++++++--- packages/statusbar/style/kernel-icon.svg | 4 +- packages/statusbar/style/terminal-icon.svg | 2 +- 9 files changed, 96 insertions(+), 46 deletions(-) create mode 100644 packages/statusbar/src/components/lineForm.tsx diff --git a/packages/application/style/images.css b/packages/application/style/images.css index a462ba3a6393..23e8e8aa02b6 100644 --- a/packages/application/style/images.css +++ b/packages/application/style/images.css @@ -4,9 +4,12 @@ |----------------------------------------------------------------------------*/ /* CSS for generic svg icons */ -.jp-icon { - fill: var(--jp-ui-font-color0); - stroke: var(--jp-ui-font-color0); +.jp-icon-fill { + fill: var(--jp-ui-font-color1); +} + +.jp-icon-stroke { + stroke: var(--jp-ui-font-color1); } .jp-icon-accent0 { diff --git a/packages/notebook/style/not-trusted-icon.svg b/packages/notebook/style/not-trusted-icon.svg index e3de1ed45dd9..a235b32b5495 100644 --- a/packages/notebook/style/not-trusted-icon.svg +++ b/packages/notebook/style/not-trusted-icon.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/packages/notebook/style/trusted-icon.svg b/packages/notebook/style/trusted-icon.svg index b7ae40ec21c9..a0624634ddba 100644 --- a/packages/notebook/style/trusted-icon.svg +++ b/packages/notebook/style/trusted-icon.svg @@ -1,4 +1,4 @@ - - + + diff --git a/packages/statusbar/src/components/icon.tsx b/packages/statusbar/src/components/icon.tsx index 7df97886c34f..01e2bf4d908f 100644 --- a/packages/statusbar/src/components/icon.tsx +++ b/packages/statusbar/src/components/icon.tsx @@ -64,17 +64,3 @@ export function SVGIconItem( const { SVG, className, offset, ...rest } = props; return ; } - -export function SVGInputItem( - props: SVGIconItem.IProps & - React.HTMLAttributes & - React.HTMLAttributes -): React.ReactElement { - const { SVG, className, ...rest } = props; - return ( - - ); -} diff --git a/packages/statusbar/src/components/lineForm.tsx b/packages/statusbar/src/components/lineForm.tsx new file mode 100644 index 000000000000..956916491f4d --- /dev/null +++ b/packages/statusbar/src/components/lineForm.tsx @@ -0,0 +1,49 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import React, { ComponentType, HTMLAttributes } from 'react'; + +import { + lineFormButtonDiv, + lineFormButtonIcon, + lineFormButton +} from '../style/lineForm'; + +/** + * A namespace for LineFormButtonItem statics. + */ +export namespace LineFormButtonItem { + /** + * Props for an LineFormButtonItem + */ + export interface IProps { + /** + * The inline svg + */ + SVG: ComponentType>; + + /** + * The input type + */ + type: string; + + /** + * The input value + */ + value: string; + } +} + +export function LineFormButtonItem( + props: LineFormButtonItem.IProps & + React.HTMLAttributes & + React.HTMLAttributes +): React.ReactElement { + const { SVG, type, value, ...rest } = props; + return ( +
+ + +
+ ); +} diff --git a/packages/statusbar/src/defaults/lineCol.tsx b/packages/statusbar/src/defaults/lineCol.tsx index 68969f043d88..6b881f336c1f 100644 --- a/packages/statusbar/src/defaults/lineCol.tsx +++ b/packages/statusbar/src/defaults/lineCol.tsx @@ -7,18 +7,19 @@ import { VDomRenderer, VDomModel, ReactWidget } from '@jupyterlab/apputils'; import { CodeEditor } from '@jupyterlab/codeeditor'; -import { interactiveItem, showPopup, Popup, TextItem } from '..'; +import { classes } from 'typestyle/lib'; + +import { interactiveItem, Popup, showPopup, TextItem } from '..'; import { lineFormWrapper, lineFormInput, lineFormSearch, lineFormWrapperFocusWithin, - lineFormCaption, - lineFormButton + lineFormCaption } from '../style/lineForm'; -import { classes } from 'typestyle/lib'; +import { LineFormButtonItem } from '../components/lineForm'; import LineFormIcon from '../../style/line-form.svg'; @@ -113,15 +114,7 @@ class LineFormComponent extends React.Component< this._textInput = input; }} /> - -
- - -
+