From d001aea19a1003b574eb9739b23d4a43175512b1 Mon Sep 17 00:00:00 2001 From: Ryan Keairns Date: Tue, 18 Jun 2019 16:24:44 -0500 Subject: [PATCH 1/2] add zoom in and out icons --- CHANGELOG.md | 1 + src-docs/src/views/icon/icons.js | 2 ++ .../icon/__snapshots__/icon.test.tsx.snap | 30 +++++++++++++++++++ .../icon/assets/magnifyWithMinus.js | 14 +++++++++ .../icon/assets/magnifyWithMinus.svg | 3 ++ src/components/icon/assets/magnifyWithPlus.js | 14 +++++++++ .../icon/assets/magnifyWithPlus.svg | 3 ++ src/components/icon/icon.tsx | 2 ++ 8 files changed, 69 insertions(+) create mode 100644 src/components/icon/assets/magnifyWithMinus.js create mode 100644 src/components/icon/assets/magnifyWithMinus.svg create mode 100644 src/components/icon/assets/magnifyWithPlus.js create mode 100644 src/components/icon/assets/magnifyWithPlus.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 91264f0b3e3..b3cab0d4df9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Changed `EuiNavDrawerFlyout` title from `h5` to `div` ([#2040](https://github.com/elastic/eui/pull/2040)) +- Added `magnifyWithMinus` and `magnifyWithPlus` glyphs to `EuiIcon` ([2056](https://github.com/elastic/eui/pull/2056)) **Bug fixes** diff --git a/src-docs/src/views/icon/icons.js b/src-docs/src/views/icon/icons.js index fb567f8dc06..960b1eac6eb 100644 --- a/src-docs/src/views/icon/icons.js +++ b/src-docs/src/views/icon/icons.js @@ -122,6 +122,8 @@ const iconTypes = [ 'logstashInput', 'logstashOutput', 'logstashQueue', + 'magnifyWithMinus', + 'magnifyWithPlus', 'magnet', 'mapMarker', 'memory', diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 33271e7d2f4..e36409fdf27 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -4752,6 +4752,36 @@ exports[`EuiIcon props type magnet is rendered 1`] = ` `; +exports[`EuiIcon props type magnifyWithMinus is rendered 1`] = ` + + + +`; + +exports[`EuiIcon props type magnifyWithPlus is rendered 1`] = ` + + + +`; + exports[`EuiIcon props type managementApp is rendered 1`] = ` ( + + + +); + +export const icon = EuiIconMagnifyWithMinus; diff --git a/src/components/icon/assets/magnifyWithMinus.svg b/src/components/icon/assets/magnifyWithMinus.svg new file mode 100644 index 00000000000..3ab09c5aa8f --- /dev/null +++ b/src/components/icon/assets/magnifyWithMinus.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/assets/magnifyWithPlus.js b/src/components/icon/assets/magnifyWithPlus.js new file mode 100644 index 00000000000..6b5a86d93e0 --- /dev/null +++ b/src/components/icon/assets/magnifyWithPlus.js @@ -0,0 +1,14 @@ +import React from 'react'; + +const EuiIconMagnifyWithPlus = props => ( + + + +); + +export const icon = EuiIconMagnifyWithPlus; diff --git a/src/components/icon/assets/magnifyWithPlus.svg b/src/components/icon/assets/magnifyWithPlus.svg new file mode 100644 index 00000000000..d4eef38b0fc --- /dev/null +++ b/src/components/icon/assets/magnifyWithPlus.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx index 3ca3a1def28..bb3240c0900 100644 --- a/src/components/icon/icon.tsx +++ b/src/components/icon/icon.tsx @@ -198,6 +198,8 @@ const typeToPathMap = { logstashQueue: 'logstash_queue', machineLearningApp: 'app_ml', magnet: 'magnet', + magnifyWithMinus: 'magnifyWithMinus', + magnifyWithPlus: 'magnifyWithPlus', managementApp: 'app_management', mapMarker: 'map_marker', memory: 'memory', From d96f0497a152be95bde5f3688f50da7f5426703c Mon Sep 17 00:00:00 2001 From: Ryan Keairns Date: Tue, 18 Jun 2019 20:59:49 -0500 Subject: [PATCH 2/2] smaller magnifying glass, no subpxls --- src/components/icon/__snapshots__/icon.test.tsx.snap | 4 ++-- src/components/icon/assets/magnifyWithMinus.js | 2 +- src/components/icon/assets/magnifyWithMinus.svg | 2 +- src/components/icon/assets/magnifyWithPlus.js | 2 +- src/components/icon/assets/magnifyWithPlus.svg | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index e36409fdf27..349c9f55881 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -4762,7 +4762,7 @@ exports[`EuiIcon props type magnifyWithMinus is rendered 1`] = ` xmlns="http://www.w3.org/2000/svg" > `; @@ -4777,7 +4777,7 @@ exports[`EuiIcon props type magnifyWithPlus is rendered 1`] = ` xmlns="http://www.w3.org/2000/svg" > `; diff --git a/src/components/icon/assets/magnifyWithMinus.js b/src/components/icon/assets/magnifyWithMinus.js index 3db502e0d98..2187a62802a 100644 --- a/src/components/icon/assets/magnifyWithMinus.js +++ b/src/components/icon/assets/magnifyWithMinus.js @@ -7,7 +7,7 @@ const EuiIconMagnifyWithMinus = props => ( viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" {...props}> - + ); diff --git a/src/components/icon/assets/magnifyWithMinus.svg b/src/components/icon/assets/magnifyWithMinus.svg index 3ab09c5aa8f..9e90302ea5e 100644 --- a/src/components/icon/assets/magnifyWithMinus.svg +++ b/src/components/icon/assets/magnifyWithMinus.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/magnifyWithPlus.js b/src/components/icon/assets/magnifyWithPlus.js index 6b5a86d93e0..aef8740b3c6 100644 --- a/src/components/icon/assets/magnifyWithPlus.js +++ b/src/components/icon/assets/magnifyWithPlus.js @@ -7,7 +7,7 @@ const EuiIconMagnifyWithPlus = props => ( viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" {...props}> - + ); diff --git a/src/components/icon/assets/magnifyWithPlus.svg b/src/components/icon/assets/magnifyWithPlus.svg index d4eef38b0fc..c2c21fdd8f4 100644 --- a/src/components/icon/assets/magnifyWithPlus.svg +++ b/src/components/icon/assets/magnifyWithPlus.svg @@ -1,3 +1,3 @@ - +