Skip to content

Commit

Permalink
Add 'sparkles' glyph to EuiIcon (#6898)
Browse files Browse the repository at this point in the history
* Add stardust glyph to EuiIcon

* Stardust is no more. Long live sparkles.
  • Loading branch information
ryankeairns authored Jun 30, 2023
1 parent 17754ce commit a4103fe
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 0 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 @@ -221,6 +221,7 @@ export const iconTypes = [
'sortRight',
'sortUp',
'spaces',
'sparkles',
'starEmpty',
'starEmptySpace',
'starFilled',
Expand Down
19 changes: 19 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8737,6 +8737,25 @@ exports[`EuiIcon props type spacesApp is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type sparkles is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon emotion-euiIcon-m-isLoaded"
data-icon-type="sparkles"
data-is-loaded="true"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m5.016 4.383.035-.093a.492.492 0 0 1 .898 0l.035.093c.048.128.072.192.097.253a5.9 5.9 0 0 0 3.536 3.38l.093.035a.492.492 0 0 1 0 .898l-.093.035a5.9 5.9 0 0 0-3.536 3.38c-.025.06-.049.125-.097.253l-.035.093a.492.492 0 0 1-.898 0l-.035-.093c-.048-.128-.072-.192-.097-.253a5.9 5.9 0 0 0-3.536-3.38 2.175 2.175 0 0 1-.093-.035.492.492 0 0 1 0-.898l.093-.035c.128-.048.192-.072.253-.097a5.9 5.9 0 0 0 3.38-3.536Zm6.769-2.213a.968.968 0 0 1 .016-.041.219.219 0 0 1 .398 0 2.622 2.622 0 0 0 1.518 1.613l.113.043a.272.272 0 0 1 .04.016.219.219 0 0 1 0 .398.272.272 0 0 1-.04.016l-.113.043a2.622 2.622 0 0 0-1.502 1.572.968.968 0 0 1-.016.04.219.219 0 0 1-.398 0 2.622 2.622 0 0 0-1.518-1.613l-.113-.042a.272.272 0 0 1-.04-.016.219.219 0 0 1 0-.398.272.272 0 0 1 .04-.016l.113-.043a2.622 2.622 0 0 0 1.502-1.572Zm-.555 8.043.02-.052a.273.273 0 0 1 .5 0l.02.052.053.14a3.275 3.275 0 0 0 1.824 1.824l.14.054c.03.01.044.016.052.02a.273.273 0 0 1 0 .498 1.248 1.248 0 0 1-.052.02c-.07.027-.107.04-.14.054a3.279 3.279 0 0 0-1.824 1.824l-.054.14a.409.409 0 0 1-.02.052.273.273 0 0 1-.498 0 1.248 1.248 0 0 1-.02-.052c-.027-.07-.04-.107-.054-.14a3.279 3.279 0 0 0-1.824-1.824l-.14-.054a1.24 1.24 0 0 1-.052-.02.273.273 0 0 1 0-.498 1.24 1.24 0 0 1 .052-.02l.14-.054a3.279 3.279 0 0 0 1.824-1.824l.054-.14Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type sqlApp is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
37 changes: 37 additions & 0 deletions src/components/icon/assets/sparkles.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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 EuiIconSparkles = ({
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
fillRule="evenodd"
d="m5.016 4.383.035-.093a.492.492 0 0 1 .898 0l.035.093c.048.128.072.192.097.253a5.9 5.9 0 0 0 3.536 3.38l.093.035a.492.492 0 0 1 0 .898l-.093.035a5.9 5.9 0 0 0-3.536 3.38c-.025.06-.049.125-.097.253l-.035.093a.492.492 0 0 1-.898 0l-.035-.093c-.048-.128-.072-.192-.097-.253a5.9 5.9 0 0 0-3.536-3.38 2.175 2.175 0 0 1-.093-.035.492.492 0 0 1 0-.898l.093-.035c.128-.048.192-.072.253-.097a5.9 5.9 0 0 0 3.38-3.536Zm6.769-2.213a.968.968 0 0 1 .016-.041.219.219 0 0 1 .398 0 2.622 2.622 0 0 0 1.518 1.613l.113.043a.272.272 0 0 1 .04.016.219.219 0 0 1 0 .398.272.272 0 0 1-.04.016l-.113.043a2.622 2.622 0 0 0-1.502 1.572.968.968 0 0 1-.016.04.219.219 0 0 1-.398 0 2.622 2.622 0 0 0-1.518-1.613l-.113-.042a.272.272 0 0 1-.04-.016.219.219 0 0 1 0-.398.272.272 0 0 1 .04-.016l.113-.043a2.622 2.622 0 0 0 1.502-1.572Zm-.555 8.043.02-.052a.273.273 0 0 1 .5 0l.02.052.053.14a3.275 3.275 0 0 0 1.824 1.824l.14.054c.03.01.044.016.052.02a.273.273 0 0 1 0 .498 1.248 1.248 0 0 1-.052.02c-.07.027-.107.04-.14.054a3.279 3.279 0 0 0-1.824 1.824l-.054.14a.409.409 0 0 1-.02.052.273.273 0 0 1-.498 0 1.248 1.248 0 0 1-.02-.052c-.027-.07-.04-.107-.054-.14a3.279 3.279 0 0 0-1.824-1.824l-.14-.054a1.24 1.24 0 0 1-.052-.02.273.273 0 0 1 0-.498 1.24 1.24 0 0 1 .052-.02l.14-.054a3.279 3.279 0 0 0 1.824-1.824l.054-.14Z"
/>
</svg>
);
export const icon = EuiIconSparkles;
1 change: 1 addition & 0 deletions src/components/icon/icon_glyphs.a11y.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ describe('EuiIcons', () => {
'sortRight',
'sortUp',
'spaces',
'sparkles',
'starEmpty',
'starEmptySpace',
'starFilled',
Expand Down
1 change: 1 addition & 0 deletions src/components/icon/icon_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ export const typeToPathMap = {
sortable: 'sortable',
spaces: 'spaces',
spacesApp: 'app_spaces',
sparkles: 'sparkles',
sqlApp: 'app_sql',
starEmpty: 'star_empty',
starEmptySpace: 'star_empty_space',
Expand Down
3 changes: 3 additions & 0 deletions src/components/icon/svgs/sparkles.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions upcoming_changelogs/6898.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added `sparkles` glyph to `EuiIcon`

0 comments on commit a4103fe

Please sign in to comment.