From 3ac45055e8da8916dda7475830cdb1f2fdcfb4c3 Mon Sep 17 00:00:00 2001 From: miukimiu Date: Wed, 22 Jul 2020 17:15:31 +0100 Subject: [PATCH 1/8] Adding return glyph to EuiIcon --- CHANGELOG.md | 1 + src-docs/src/views/icon/icons.js | 1 + .../icon/__snapshots__/icon.test.tsx.snap | 19 ++++++++++++++++++ src/components/icon/assets/return.js | 20 +++++++++++++++++++ src/components/icon/assets/return.svg | 3 +++ src/components/icon/icon.tsx | 1 + 6 files changed, 45 insertions(+) create mode 100644 src/components/icon/assets/return.js create mode 100644 src/components/icon/assets/return.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 051223fb642..5cb583e281e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Added `analyzeEvent` glyph in `EuiIcon` ([#3729](https://github.com/elastic/eui/pull/3729)) - Updated `EuiComboBox` to allow the options list to open for single selection custom options ([#3706](https://github.com/elastic/eui/pull/3706)) - Added `useEuiI18n` hook for localization ([#3749](https://github.com/elastic/eui/pull/3749)) +- Added `return` glyph to `EuiIcon` ([#3364](https://github.com/elastic/eui/pull/3364)) **Bug fixes** diff --git a/src-docs/src/views/icon/icons.js b/src-docs/src/views/icon/icons.js index 180512c64f7..58a88213201 100644 --- a/src-docs/src/views/icon/icons.js +++ b/src-docs/src/views/icon/icons.js @@ -162,6 +162,7 @@ export const iconTypes = [ 'quote', 'refresh', 'reporter', + 'return', 'save', 'scale', 'search', diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index f17958fee77..f26e0858b2b 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -6706,6 +6706,25 @@ exports[`EuiIcon props type reportingApp is rendered 1`] = ` `; +exports[`EuiIcon props type return is rendered 1`] = ` + +`; + exports[`EuiIcon props type save is rendered 1`] = ` ); diff --git a/src/components/icon/assets/return.svg b/src/components/icon/assets/return.svg index 0ae4a4cbe9e..2996ff8bb52 100644 --- a/src/components/icon/assets/return.svg +++ b/src/components/icon/assets/return.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file From 06f7cacb29d830591b64916ea17fb0c91749ffed Mon Sep 17 00:00:00 2001 From: miukimiu Date: Wed, 22 Jul 2020 19:23:01 +0100 Subject: [PATCH 5/8] Updating icon position --- src/components/icon/__snapshots__/icon.test.tsx.snap | 2 +- src/components/icon/assets/return.js | 2 +- src/components/icon/assets/return.svg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 3cf6884b16d..0272047cf8d 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -6718,7 +6718,7 @@ exports[`EuiIcon props type return is rendered 1`] = ` xmlns="http://www.w3.org/2000/svg" > `; diff --git a/src/components/icon/assets/return.js b/src/components/icon/assets/return.js index 567fce120ca..108a3315f42 100644 --- a/src/components/icon/assets/return.js +++ b/src/components/icon/assets/return.js @@ -9,7 +9,7 @@ const EuiIconReturn = ({ title, titleId, ...props }) => ( aria-labelledby={titleId} {...props}> {title ? {title} : null} - + ); diff --git a/src/components/icon/assets/return.svg b/src/components/icon/assets/return.svg index 2996ff8bb52..bc2dd3fdeec 100644 --- a/src/components/icon/assets/return.svg +++ b/src/components/icon/assets/return.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file From 73e9f5cf2a38b65a95a27b8f4f92d955d3989f07 Mon Sep 17 00:00:00 2001 From: miukimiu Date: Thu, 23 Jul 2020 15:23:40 +0100 Subject: [PATCH 6/8] Renaming icon --- src-docs/src/views/icon/icons.js | 2 +- src/components/icon/assets/return_key.js | 16 ++++++++++++++++ .../icon/assets/{return.svg => return_key.svg} | 0 src/components/icon/icon.tsx | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/components/icon/assets/return_key.js rename src/components/icon/assets/{return.svg => return_key.svg} (100%) diff --git a/src-docs/src/views/icon/icons.js b/src-docs/src/views/icon/icons.js index 58a88213201..384ed3cc0dc 100644 --- a/src-docs/src/views/icon/icons.js +++ b/src-docs/src/views/icon/icons.js @@ -162,7 +162,7 @@ export const iconTypes = [ 'quote', 'refresh', 'reporter', - 'return', + 'returnKey', 'save', 'scale', 'search', diff --git a/src/components/icon/assets/return_key.js b/src/components/icon/assets/return_key.js new file mode 100644 index 00000000000..c7409a38e98 --- /dev/null +++ b/src/components/icon/assets/return_key.js @@ -0,0 +1,16 @@ +import React from 'react'; + +const EuiIconReturnKey = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconReturnKey; diff --git a/src/components/icon/assets/return.svg b/src/components/icon/assets/return_key.svg similarity index 100% rename from src/components/icon/assets/return.svg rename to src/components/icon/assets/return_key.svg diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx index ee8fedc6fe7..1e1391a263d 100644 --- a/src/components/icon/icon.tsx +++ b/src/components/icon/icon.tsx @@ -301,7 +301,7 @@ const typeToPathMap = { refresh: 'refresh', reporter: 'reporter', reportingApp: 'app_reporting', - return: 'return', + returnKey: 'return_key', save: 'save', savedObjectsApp: 'app_saved_objects', scale: 'scale', From b6c6aa4979bc1bc6e4b11e5d074b81c73cad0735 Mon Sep 17 00:00:00 2001 From: miukimiu Date: Thu, 23 Jul 2020 15:25:57 +0100 Subject: [PATCH 7/8] Snapshot --- src/components/icon/__snapshots__/icon.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 0272047cf8d..d3f96738f9e 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -6706,7 +6706,7 @@ exports[`EuiIcon props type reportingApp is rendered 1`] = ` `; -exports[`EuiIcon props type return is rendered 1`] = ` +exports[`EuiIcon props type returnKey is rendered 1`] = `