From df5b1b2c8b23f843649a72a561d799ec117bfa51 Mon Sep 17 00:00:00 2001 From: DeFazio Date: Fri, 11 Oct 2019 14:30:51 -0400 Subject: [PATCH] Adds keyboardShortcut glyph to EuiIcon --- CHANGELOG.md | 1 + src-docs/src/views/icon/icons.js | 1 + .../icon/__snapshots__/icon.test.tsx.snap | 15 +++++++++++++++ src/components/icon/assets/keyboard_shortcut.js | 14 ++++++++++++++ src/components/icon/assets/keyboard_shortcut.svg | 3 +++ src/components/icon/icon.tsx | 1 + 6 files changed, 35 insertions(+) create mode 100644 src/components/icon/assets/keyboard_shortcut.js create mode 100644 src/components/icon/assets/keyboard_shortcut.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ab22f7ed00..4e8547e7ce8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Migrate `EuiBreadcrumbs`, `EuiHeader` etc, and `EuiLink` to TypeScript ([#2391](https://github.com/elastic/eui/pull/2391)) - Added `component` prop to `EuiPageBody`, switching the default from `div` to `main` ([#2410](https://github.com/elastic/eui/pull/2410)) - Added focus state to `EuiListGroupItem` ([#2406](https://github.com/elastic/eui/pull/2406)) +- Added `keyboardShorcut` glyph to 'EuiIcon ([#2413](https://github.com/elastic/eui/pull/2413)) **Bug fixes** diff --git a/src-docs/src/views/icon/icons.js b/src-docs/src/views/icon/icons.js index 2626da56c8e..f96b047a872 100644 --- a/src-docs/src/views/icon/icons.js +++ b/src-docs/src/views/icon/icons.js @@ -98,6 +98,7 @@ const iconTypes = [ 'inspect', 'invert', 'ip', + 'keyboardShortcut', 'kqlField', 'kqlFunction', 'kqlOperand', diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index c68441bc805..74dc200aef5 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -2539,6 +2539,21 @@ exports[`EuiIcon props type ip is rendered 1`] = ` `; +exports[`EuiIcon props type keyboardShortcut is rendered 1`] = ` + + + +`; + exports[`EuiIcon props type kqlField is rendered 1`] = ` ( + + + +); + +export const icon = EuiIconKeyboardShortcut; diff --git a/src/components/icon/assets/keyboard_shortcut.svg b/src/components/icon/assets/keyboard_shortcut.svg new file mode 100644 index 00000000000..4fd1b835d63 --- /dev/null +++ b/src/components/icon/assets/keyboard_shortcut.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx index 2989736c85c..8c51db403e6 100644 --- a/src/components/icon/icon.tsx +++ b/src/components/icon/icon.tsx @@ -148,6 +148,7 @@ const typeToPathMap = { inspect: 'inspect', invert: 'invert', ip: 'ip', + keyboardShortcut: 'keyboard_shortcut', kqlField: 'kql_field', kqlFunction: 'kql_function', kqlOperand: 'kql_operand',