Skip to content

Commit

Permalink
[EuiIcon] Update user Icon (#5877)
Browse files Browse the repository at this point in the history
  • Loading branch information
opauloh authored May 6, 2022
1 parent d6e6931 commit b7f6eac
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 13 deletions.
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 @@ -234,6 +234,7 @@ export const iconTypes = [
'unfold',
'unlink',
'user',
'userAvatar',
'users',
'vector',
'videoPlayer',
Expand Down
23 changes: 23 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10008,6 +10008,29 @@ exports[`EuiIcon props type user is rendered 1`] = `
class="euiIcon euiIcon--medium euiIcon-isLoaded"
data-icon-type="user"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M8 9a4 4 0 100-8 4 4 0 000 8zm0-1a3 3 0 100-6 3 3 0 000 6z"
fill-rule="evenodd"
/>
<path
d="M15 14.291A9.053 9.053 0 008 11a9.053 9.053 0 00-7 3.291l.715.71A8.047 8.047 0 018 11.996 8.047 8.047 0 0114.286 15l.714-.71z"
/>
</svg>
`;

exports[`EuiIcon props type userAvatar is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
data-icon-type="userAvatar"
focusable="false"
height="18"
role="img"
viewBox="0 0 18 18"
Expand Down
16 changes: 9 additions & 7 deletions src/components/icon/assets/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ const EuiIconUser = ({
}: React.SVGProps<SVGSVGElement> & SVGRProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={18}
height={18}
viewBox="0 0 18 18"
width={16}
height={16}
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<g fillRule="evenodd">
<path d="M13.689 11.132c1.155 1.222 1.953 2.879 2.183 4.748a1.007 1.007 0 01-1 1.12H3.007a1.005 1.005 0 01-1-1.12c.23-1.87 1.028-3.526 2.183-4.748.247.228.505.442.782.633-1.038 1.069-1.765 2.55-1.972 4.237L14.872 16c-.204-1.686-.93-3.166-1.966-4.235a7.01 7.01 0 00.783-.633zM8.939 1c1.9 0 3 2 4.38 2.633a2.483 2.483 0 01-1.88.867c-.298 0-.579-.06-.844-.157A3.726 3.726 0 017.69 5.75c-1.395 0-3.75.25-3.245-1.903C5.94 3 6.952 1 8.94 1z" />
<path d="M8.94 2c2.205 0 4 1.794 4 4s-1.795 4-4 4c-2.207 0-4-1.794-4-4s1.793-4 4-4m0 9A5 5 0 108.937.999 5 5 0 008.94 11" />
</g>
<path
fillRule="evenodd"
d="M8 9a4 4 0 100-8 4 4 0 000 8zm0-1a3 3 0 100-6 3 3 0 000 6z"
clipRule="evenodd"
/>
<path d="M15 14.291A9.053 9.053 0 008 11a9.053 9.053 0 00-7 3.291l.715.71A8.047 8.047 0 018 11.996 8.047 8.047 0 0114.286 15l.714-.71z" />
</svg>
);

Expand Down
38 changes: 38 additions & 0 deletions src/components/icon/assets/userAvatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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';
interface SVGRProps {
title?: string;
titleId?: string;
}

const EuiIconUserAvatar = ({
title,
titleId,
...props
}: React.SVGProps<SVGSVGElement> & SVGRProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={18}
height={18}
viewBox="0 0 18 18"
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<g fillRule="evenodd">
<path d="M13.689 11.132c1.155 1.222 1.953 2.879 2.183 4.748a1.007 1.007 0 01-1 1.12H3.007a1.005 1.005 0 01-1-1.12c.23-1.87 1.028-3.526 2.183-4.748.247.228.505.442.782.633-1.038 1.069-1.765 2.55-1.972 4.237L14.872 16c-.204-1.686-.93-3.166-1.966-4.235a7.01 7.01 0 00.783-.633zM8.939 1c1.9 0 3 2 4.38 2.633a2.483 2.483 0 01-1.88.867c-.298 0-.579-.06-.844-.157A3.726 3.726 0 017.69 5.75c-1.395 0-3.75.25-3.245-1.903C5.94 3 6.952 1 8.94 1z" />
<path d="M8.94 2c2.205 0 4 1.794 4 4s-1.795 4-4 4c-2.207 0-4-1.794-4-4s1.793-4 4-4m0 9A5 5 0 108.937.999 5 5 0 008.94 11" />
</g>
</svg>
);

export const icon = EuiIconUserAvatar;
1 change: 1 addition & 0 deletions src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ const typeToPathMap = {
upgradeAssistantApp: 'app_upgrade_assistant',
uptimeApp: 'app_uptime',
user: 'user',
userAvatar: 'userAvatar',
users: 'users',
usersRolesApp: 'app_users_roles',
vector: 'vector',
Expand Down
10 changes: 4 additions & 6 deletions src/components/icon/svgs/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/components/icon/svgs/userAvatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions upcoming_changelogs/5877.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Renamed `user` glyph to `userAvatar` in `EuiIcon`
- Added new `user` glyph in `EuiIcon`

0 comments on commit b7f6eac

Please sign in to comment.