Skip to content

Commit

Permalink
Add download glyph to EuiIcon (#3364)
Browse files Browse the repository at this point in the history
* Adding download glyph to  EuiIcon

* Updating changelog with PR number

* Improving icon

* Updating test
  • Loading branch information
elizabetdev authored Apr 23, 2020
1 parent e252a06 commit 9e17bcf
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Added `download` glyph to `EuiIcon` ([#3364](https://github.com/elastic/eui/pull/3364))
- Applies `max-width: 100%` to `EuiPageBody` so inner flex-based items don't overflow their containers ([#3375](https://github.com/elastic/eui/pull/3375))

## [`23.1.0`](https://github.com/elastic/eui/tree/v23.1.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 @@ -67,6 +67,7 @@ export const iconTypes = [
'documentEdit',
'documents',
'dot',
'download',
'email',
'empty',
'exit',
Expand Down
20 changes: 20 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,26 @@ exports[`EuiIcon props type dot is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type download 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="M9 9.114l1.85-1.943a.52.52 0 01.77 0c.214.228.214.6 0 .829l-1.95 2.05a1.552 1.552 0 01-2.31 0L5.41 8a.617.617 0 010-.829.52.52 0 01.77 0L8 9.082V.556C8 .249 8.224 0 8.5 0s.5.249.5.556v8.558z"
/>
<path
d="M16 13.006V10h-1v3.006a.995.995 0 01-.994.994H3.01a.995.995 0 01-.994-.994V10h-1v3.006c0 1.1.892 1.994 1.994 1.994h10.996c1.1 0 1.994-.893 1.994-1.994z"
/>
</svg>
`;

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

const EuiIconDownload = ({ 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="M9 9.114l1.85-1.943a.52.52 0 01.77 0c.214.228.214.6 0 .829l-1.95 2.05a1.552 1.552 0 01-2.31 0L5.41 8a.617.617 0 010-.829.52.52 0 01.77 0L8 9.082V.556C8 .249 8.224 0 8.5 0s.5.249.5.556v8.558z" />
<path d="M16 13.006V10h-1v3.006a.995.995 0 01-.994.994H3.01a.995.995 0 01-.994-.994V10h-1v3.006c0 1.1.892 1.994 1.994 1.994h10.996c1.1 0 1.994-.893 1.994-1.994z" />
</svg>
);

export const icon = EuiIconDownload;
4 changes: 4 additions & 0 deletions src/components/icon/assets/download.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 @@ -100,6 +100,7 @@ const typeToPathMap = {
documentEdit: 'documentEdit',
documents: 'documents',
dot: 'dot',
download: 'download',
editorAlignCenter: 'editor_align_center',
editorAlignLeft: 'editor_align_left',
editorAlignRight: 'editor_align_right',
Expand Down

0 comments on commit 9e17bcf

Please sign in to comment.