Skip to content

Commit

Permalink
Add returnKey glyph to EuiIcon (#3783)
Browse files Browse the repository at this point in the history
* Adding return glyph to EuiIcon

* Deleting non required code

* Updating CL number

* Improving icon

* Updating icon position

* Renaming icon

* Snapshot

* removing unnecessary file
  • Loading branch information
elizabetdev authored Jul 23, 2020
1 parent ce13603 commit 602ce3f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Updated lodash to `v4.17.19` ([#3764](https://github.com/elastic/eui/pull/3764))
- Added `returnKey` glyph to `EuiIcon` ([#3783](https://github.com/elastic/eui/pull/3783))

## [`27.2.0`](https://github.com/elastic/eui/tree/v27.2.0)

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 @@ -162,6 +162,7 @@ export const iconTypes = [
'quote',
'refresh',
'reporter',
'returnKey',
'save',
'scale',
'search',
Expand Down
17 changes: 17 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6706,6 +6706,23 @@ exports[`EuiIcon props type reportingApp is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type returnKey is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11.994 4c1.059 0 1.924.818 2 1.856l.006.15v1.988a2.005 2.005 0 01-1.856 2L12 10H3.484l1.91 1.82a.52.52 0 010 .77.616.616 0 01-.829 0l-2.05-1.95a1.551 1.551 0 010-2.31l2.05-1.95a.617.617 0 01.83 0 .52.52 0 010 .77L3.45 9H12c.514-.003.935-.39.993-.888L13 7.994V6.006c0-.516-.388-.941-.888-1L11.994 5H9.5a.5.5 0 01-.09-.992L9.5 4h2.494z"
/>
</svg>
`;

exports[`EuiIcon props type save is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
16 changes: 16 additions & 0 deletions src/components/icon/assets/return_key.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';

const EuiIconReturnKey = ({ title, titleId, ...props }) => (
<svg
width={16}
height={16}
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
aria-labelledby={titleId}
{...props}>
{title ? <title id={titleId}>{title}</title> : null}
<path d="M11.994 4c1.059 0 1.924.818 2 1.856l.006.15v1.988a2.005 2.005 0 01-1.856 2L12 10H3.484l1.91 1.82a.52.52 0 010 .77.616.616 0 01-.829 0l-2.05-1.95a1.551 1.551 0 010-2.31l2.05-1.95a.617.617 0 01.83 0 .52.52 0 010 .77L3.45 9H12c.514-.003.935-.39.993-.888L13 7.994V6.006c0-.516-.388-.941-.888-1L11.994 5H9.5a.5.5 0 01-.09-.992L9.5 4h2.494z" />
</svg>
);

export const icon = EuiIconReturnKey;
3 changes: 3 additions & 0 deletions src/components/icon/assets/return_key.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 @@ -301,6 +301,7 @@ const typeToPathMap = {
refresh: 'refresh',
reporter: 'reporter',
reportingApp: 'app_reporting',
returnKey: 'return_key',
save: 'save',
savedObjectsApp: 'app_saved_objects',
scale: 'scale',
Expand Down

0 comments on commit 602ce3f

Please sign in to comment.