Skip to content

Commit

Permalink
Added package icon to glyph set (elastic#2378)
Browse files Browse the repository at this point in the history
* added package.js + package.svg

* added icon reference to icon.tsx and src-docs/.../icon.js

* update package icon

* updated changelog

* fixed svg viewbox

* update package icon

* updated icon test snapshot
  • Loading branch information
hbharding authored and snide committed Oct 10, 2019
1 parent 0cf90f7 commit 3619e81
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
@@ -1,5 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Added `package` icon to glyph set ([#2378](https://github.com/elastic/eui/pull/2378))
- Modified `EuiFacetButton` to use `$euiFocusBackgroundColor` for `:focus` state ([2365](https://github.com/elastic/eui/pull/2365))
- Added a `showMaxPopover` option for `EuiBreadcrumbs` to display all items when a `max` is set. ([#2342](https://github.com/elastic/eui/pull/2342))
- Added `data-test-subj` support for basic and in-memory tables' actions ([#2353](https://github.com/elastic/eui/pull/2353))
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 @@ -128,6 +128,7 @@ export const iconTypes = [
'number',
'offline',
'online',
'package',
'partial',
'pause',
'pencil',
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 @@ -5074,6 +5074,21 @@ exports[`EuiIcon props type online is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type package 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="M14.4472,3.72363l-6-3a.99965.99965,0,0,0-.8944,0l-6,3A.99992.99992,0,0,0,1,4.618v6.764a1.00012,1.00012,0,0,0,.5528.89441l6,3a1,1,0,0,0,.8944,0l6-3A1.00012,1.00012,0,0,0,15,11.382V4.618A.99992.99992,0,0,0,14.4472,3.72363ZM5.87085,5.897l5.34357-2.67181L13.372,4.304,8,6.94293ZM8,1.618,10.09637,2.6662,4.74292,5.343,2.628,4.30408ZM2,5.10968,4.25,6.215V9a.5.5,0,0,0,1,0V6.70618L7.5,7.81146V14.132L2,11.382ZM8.5,14.132V7.81146L14,5.10968V11.382Z"
/>
</svg>
`;

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

const EuiIconPackage = props => (
<svg
width={16}
height={16}
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<path d="M14.4472,3.72363l-6-3a.99965.99965,0,0,0-.8944,0l-6,3A.99992.99992,0,0,0,1,4.618v6.764a1.00012,1.00012,0,0,0,.5528.89441l6,3a1,1,0,0,0,.8944,0l6-3A1.00012,1.00012,0,0,0,15,11.382V4.618A.99992.99992,0,0,0,14.4472,3.72363ZM5.87085,5.897l5.34357-2.67181L13.372,4.304,8,6.94293ZM8,1.618,10.09637,2.6662,4.74292,5.343,2.628,4.30408ZM2,5.10968,4.25,6.215V9a.5.5,0,0,0,1,0V6.70618L7.5,7.81146V14.132L2,11.382ZM8.5,14.132V7.81146L14,5.10968V11.382Z"/>
</svg>
);

export const icon = EuiIconPackage;
3 changes: 3 additions & 0 deletions src/components/icon/assets/package.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 @@ -239,6 +239,7 @@ const typeToPathMap = {
number: 'number',
offline: 'offline',
online: 'online',
package: 'package',
packetbeatApp: 'app_packetbeat',
partial: 'partial',
pause: 'pause',
Expand Down

0 comments on commit 3619e81

Please sign in to comment.