Skip to content

Commit

Permalink
Added nested glyph to EuiIcon (#2707)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos authored Dec 20, 2019
1 parent 1a9ed62 commit 32b7bef
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `17.3.1`.
- Added `nested` glyph to `EuiIcon` ([#2707](https://github.com/elastic/eui/pull/2707))

## [`17.3.1`](https://github.com/elastic/eui/tree/v17.3.1)

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 @@ -129,6 +129,7 @@ export const iconTypes = [
'minusInCircle',
'minusInCircleFilled',
'moon',
'nested',
'node',
'number',
'offline',
Expand Down
18 changes: 18 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5825,6 +5825,24 @@ exports[`EuiIcon props type moon is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type nested 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"
>
<title />
<path
d="M5.5 1a.5.5 0 010 1H3.006C2.45 2 2 2.45 2 3.006v9.988C2 13.55 2.45 14 3.006 14H5.5a.5.5 0 110 1H3.006A2.005 2.005 0 011 12.994V3.006C1 1.898 1.897 1 3.006 1H5.5zm7.494 0c1.059 0 1.924.818 2 1.856l.006.15v9.988a2.005 2.005 0 01-1.856 2l-.15.006H10.5a.5.5 0 01-.09-.992L10.5 14h2.494c.516 0 .941-.388 1-.888l.006-.118V3.006c0-.516-.388-.941-.888-1L12.994 2H10.5a.5.5 0 01-.09-.992L10.5 1h2.494zM5 7a1 1 0 110 2 1 1 0 010-2zm3 0a1 1 0 110 2 1 1 0 010-2zm3 0a1 1 0 110 2 1 1 0 010-2z"
/>
</svg>
`;

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

const EuiIconNested = ({ title, ...props }) => (
<svg
width={16}
height={16}
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<title>{title}</title>
<path d="M5.5 1a.5.5 0 010 1H3.006C2.45 2 2 2.45 2 3.006v9.988C2 13.55 2.45 14 3.006 14H5.5a.5.5 0 110 1H3.006A2.005 2.005 0 011 12.994V3.006C1 1.898 1.897 1 3.006 1H5.5zm7.494 0c1.059 0 1.924.818 2 1.856l.006.15v9.988a2.005 2.005 0 01-1.856 2l-.15.006H10.5a.5.5 0 01-.09-.992L10.5 14h2.494c.516 0 .941-.388 1-.888l.006-.118V3.006c0-.516-.388-.941-.888-1L12.994 2H10.5a.5.5 0 01-.09-.992L10.5 1h2.494zM5 7a1 1 0 110 2 1 1 0 010-2zm3 0a1 1 0 110 2 1 1 0 010-2zm3 0a1 1 0 110 2 1 1 0 010-2z" />
</svg>
);

export const icon = EuiIconNested;
3 changes: 3 additions & 0 deletions src/components/icon/assets/nested.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ const typeToPathMap = {
indexPatternApp: 'app_index_pattern',
indexRollupApp: 'app_index_rollup',
indexSettings: 'index_settings',
metricsApp: 'app_metrics',
inputOutput: 'inputOutput',
inspect: 'inspect',
invert: 'invert',
Expand Down Expand Up @@ -236,11 +235,13 @@ const typeToPathMap = {
menuRight: 'menuRight',
merge: 'merge',
metricbeatApp: 'app_metricbeat',
metricsApp: 'app_metrics',
minimize: 'minimize',
minusInCircle: 'minus_in_circle',
minusInCircleFilled: 'minus_in_circle_filled',
monitoringApp: 'app_monitoring',
moon: 'moon',
nested: 'nested',
node: 'node',
notebookApp: 'app_notebook',
number: 'number',
Expand Down

0 comments on commit 32b7bef

Please sign in to comment.