Skip to content

Commit

Permalink
Adds keyboardShortcut glyph to EuiIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
mdefazio authored Oct 11, 2019
1 parent 849e463 commit df5b1b2
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const iconTypes = [
'inspect',
'invert',
'ip',
'keyboardShortcut',
'kqlField',
'kqlFunction',
'kqlOperand',
Expand Down
15 changes: 15 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2539,6 +2539,21 @@ exports[`EuiIcon props type ip is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type keyboardShortcut is rendered 1`] = `
<svg
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15 9a1 1 0 0 1 .993.883L16 10v5a1 1 0 0 1-.883.993L15 16H7a1 1 0 0 1-.993-.883L6 15v-5a1 1 0 0 1 .883-.993L7 9h8zM2.5 10a.5.5 0 0 1 .492.41L3 10.5V12h1.5a.5.5 0 0 1 .09.992L4.5 13H3v1.5a.5.5 0 0 1-.992.09L2 14.5V13H.5a.5.5 0 0 1-.09-.992L.5 12H2v-1.5a.5.5 0 0 1 .5-.5zM15 10H7v5h8v-5zm-1 3v1H8v-1h6zm1-13a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h14zm0 1H1v5h14V1zM8 4v1H2V4h6z"
/>
</svg>
`;

exports[`EuiIcon props type kqlField is rendered 1`] = `
<svg
class="euiIcon euiIcon--medium euiIcon-isLoaded"
Expand Down
14 changes: 14 additions & 0 deletions src/components/icon/assets/keyboard_shortcut.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';

const EuiIconKeyboardShortcut = props => (
<svg
width={16}
height={16}
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<path d="M15 9a1 1 0 0 1 .993.883L16 10v5a1 1 0 0 1-.883.993L15 16H7a1 1 0 0 1-.993-.883L6 15v-5a1 1 0 0 1 .883-.993L7 9h8zM2.5 10a.5.5 0 0 1 .492.41L3 10.5V12h1.5a.5.5 0 0 1 .09.992L4.5 13H3v1.5a.5.5 0 0 1-.992.09L2 14.5V13H.5a.5.5 0 0 1-.09-.992L.5 12H2v-1.5a.5.5 0 0 1 .5-.5zM15 10H7v5h8v-5zm-1 3v1H8v-1h6zm1-13a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h14zm0 1H1v5h14V1zM8 4v1H2V4h6z" />
</svg>
);

export const icon = EuiIconKeyboardShortcut;
3 changes: 3 additions & 0 deletions src/components/icon/assets/keyboard_shortcut.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ const typeToPathMap = {
inspect: 'inspect',
invert: 'invert',
ip: 'ip',
keyboardShortcut: 'keyboard_shortcut',
kqlField: 'kql_field',
kqlFunction: 'kql_function',
kqlOperand: 'kql_operand',
Expand Down

0 comments on commit df5b1b2

Please sign in to comment.