Skip to content

Commit 0719a2b

Browse files
ek-socee-chen
andauthored
[EuiIcon] Add crossInCircle glyph (elastic#7924)
Co-authored-by: Cee Chen <[email protected]> Co-authored-by: Cee Chen <[email protected]>
1 parent 943331d commit 0719a2b

File tree

7 files changed

+119
-0
lines changed

7 files changed

+119
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Updated `EuiIcon` with a new `crossInCircle` glyph
2+

packages/eui/src-docs/src/views/icon/icons.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const iconTypes = [
6767
'copy',
6868
'copyClipboard',
6969
'cross',
70+
'crossInCircle',
7071
'crosshairs',
7172
'currency',
7273
'cut',

packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,29 @@ exports[`EuiIcon props type crossClusterReplicationApp is rendered 1`] = `
19891989
</svg>
19901990
`;
19911991

1992+
exports[`EuiIcon props type crossInCircle is rendered 1`] = `
1993+
<svg
1994+
aria-hidden="true"
1995+
class="euiIcon emotion-euiIcon-m-isLoaded"
1996+
data-icon-type="crossInCircle"
1997+
data-is-loaded="true"
1998+
fill="none"
1999+
height="16"
2000+
role="img"
2001+
viewBox="0 0 16 16"
2002+
width="16"
2003+
xmlns="http://www.w3.org/2000/svg"
2004+
>
2005+
<path
2006+
d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708Z"
2007+
/>
2008+
<path
2009+
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1 0A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"
2010+
fill-rule="evenodd"
2011+
/>
2012+
</svg>
2013+
`;
2014+
19922015
exports[`EuiIcon props type crosshairs is rendered 1`] = `
19932016
<svg
19942017
aria-hidden="true"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
10+
11+
import * as React from 'react';
12+
import type { SVGProps } from 'react';
13+
import { htmlIdGenerator } from '../../../services';
14+
interface SVGRProps {
15+
title?: string;
16+
titleId?: string;
17+
}
18+
const EuiIconCrossInCircle = ({
19+
title,
20+
titleId,
21+
...props
22+
}: SVGProps<SVGSVGElement> & SVGRProps) => {
23+
const generateId = htmlIdGenerator('crossInCircle');
24+
return (
25+
<svg
26+
xmlns="http://www.w3.org/2000/svg"
27+
width={16}
28+
height={16}
29+
fill="none"
30+
viewBox="0 0 16 16"
31+
aria-labelledby={titleId}
32+
{...props}
33+
>
34+
{title ? <title id={titleId}>{title}</title> : null}
35+
<g clipPath={`url(#${generateId('a')})`}>
36+
<path
37+
d="m8.755 8 2.64 2.641a.534.534 0 1 1-.754.755L8 8.755l-2.641 2.64a.534.534 0 1 1-.755-.754L7.245 8l-2.64-2.641a.534.534 0 1 1 .754-.755L8 7.245l2.641-2.64a.534.534 0 1 1 .755.754L8.755 8Zm4.904-5.66c3.121 3.121 3.121 8.199 0 11.32-3.12 3.12-8.198 3.12-11.318 0C-.78 10.538-.78 5.46 2.34 2.34c3.12-3.12 8.198-3.12 11.319 0Zm-.665.666a7.062 7.062 0 1 0-9.988 9.988 7.062 7.062 0 0 0 9.988-9.988Z"
38+
clipRule="evenodd"
39+
/>
40+
</g>
41+
<defs>
42+
<clipPath id={generateId('a')}>
43+
<path fill="#fff" d="M0 0h16v16H0z" />
44+
</clipPath>
45+
</defs>
46+
</svg>
47+
);
48+
};
49+
export const icon = EuiIconCrossInCircle;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
10+
11+
import * as React from 'react';
12+
import type { SVGProps } from 'react';
13+
interface SVGRProps {
14+
title?: string;
15+
titleId?: string;
16+
}
17+
const EuiIconCrossInCircle = ({
18+
title,
19+
titleId,
20+
...props
21+
}: SVGProps<SVGSVGElement> & SVGRProps) => (
22+
<svg
23+
xmlns="http://www.w3.org/2000/svg"
24+
width={16}
25+
height={16}
26+
fill="none"
27+
viewBox="0 0 16 16"
28+
aria-labelledby={titleId}
29+
{...props}
30+
>
31+
{title ? <title id={titleId}>{title}</title> : null}
32+
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708Z" />
33+
<path
34+
fillRule="evenodd"
35+
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1 0A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"
36+
/>
37+
</svg>
38+
);
39+
export const icon = EuiIconCrossInCircle;

packages/eui/src/components/icon/icon_map.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const typeToPathMap = {
7979
createSingleMetricJob: 'ml_create_single_metric_job',
8080
cross: 'cross',
8181
crossClusterReplicationApp: 'app_cross_cluster_replication',
82+
crossInCircle: 'cross_in_circle',
8283
crosshairs: 'crosshairs',
8384
currency: 'currency',
8485
cut: 'cut',
Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)