Skip to content

Commit

Permalink
[Icon] Index icon (#7498)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Stoltzfus <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
  • Loading branch information
3 people authored Feb 8, 2024
1 parent 4584d91 commit d8bb813
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelogs/upcoming/7498.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added `index` glyph to `EuiIcon`
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 @@ -123,6 +123,7 @@ export const iconTypes = [
'iInCircle',
'image',
'importAction',
'index',
'indexClose',
'indexEdit',
'indexFlush',
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 @@ -3819,6 +3819,24 @@ exports[`EuiIcon props type importAction is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type index is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon emotion-euiIcon-m-isLoaded"
data-icon-type="index"
data-is-loaded="true"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M13 2H3v11h11v1H2V1h12v12h-1V2ZM6 5h5.999V4H6v1ZM4 5V4h1v1H4Zm2 3V7h6v1H6ZM4 8V7h1v1H4Zm2 3v-1h6v1H6Zm-2 0v-1h1v1H4Z"
/>
</svg>
`;

exports[`EuiIcon props type indexClose is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
34 changes: 34 additions & 0 deletions src/components/icon/assets/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js

import * as React from 'react';
import type { SVGProps } from 'react';
interface SVGRProps {
title?: string;
titleId?: string;
}
const EuiIconIndex = ({
title,
titleId,
...props
}: SVGProps<SVGSVGElement> & SVGRProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={16}
height={16}
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<path d="M13 2H3v11h11v1H2V1h12v12h-1V2ZM6 5h5.999V4H6v1ZM4 5V4h1v1H4Zm2 3V7h6v1H6ZM4 8V7h1v1H4Zm2 3v-1h6v1H6Zm-2 0v-1h1v1H4Z" />
</svg>
);
export const icon = EuiIconIndex;
1 change: 1 addition & 0 deletions src/components/icon/icon_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export const typeToPathMap = {
iInCircle: 'iInCircle',
image: 'image',
importAction: 'import',
index: 'index',
indexClose: 'index_close',
indexEdit: 'index_edit',
indexFlush: 'index_flush',
Expand Down
3 changes: 3 additions & 0 deletions src/components/icon/svgs/index.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d8bb813

Please sign in to comment.