Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 icon
Comment thread
cee-chen marked this conversation as resolved.
Outdated
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 17 16"
width="17"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M13.063 2.5h-10v11h11v1h-12v-13h12v12h-1v-11Zm-7 3h5.999v-1h-6v1Zm-2 0v-1h1v1h-1Zm2 3v-1h6v1h-6Zm-2 0v-1h1v1h-1Zm2 3v-1h6v1h-6Zm-2 0v-1h1v1h-1Z"
/>
</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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding here as a quick note - index.tsx is technically a 'special' filename as far as webpack is concerned (considered, e.g., the root of a folder). If it's not breaking any existing behavior it's probably fine, just wanted to note that since it might be a tad confusing to other devs

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={17}
height={16}
viewBox="0 0 17 16"
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<path d="M13.063 2.5h-10v11h11v1h-12v-13h12v12h-1v-11Zm-7 3h5.999v-1h-6v1Zm-2 0v-1h1v1h-1Zm2 3v-1h6v1h-6Zm-2 0v-1h1v1h-1Zm2 3v-1h6v1h-6Zm-2 0v-1h1v1h-1Z" />
</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.