Skip to content

Commit

Permalink
feat: add sparkle_filled icon (#1452) (#1459)
Browse files Browse the repository at this point in the history
* feat: add sparkle_filled icon



* doc(changelog): add changelog for newly add sparkle icon



---------


(cherry picked from commit 7233b5a)

Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 4113627 commit 8e104c3
Show file tree
Hide file tree
Showing 5 changed files with 70 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 @@ -229,6 +229,7 @@ export const iconTypes = [
'sortLeft',
'sortRight',
'sortUp',
'sparkleFilled',
'starEmpty',
'starEmptySpace',
'starFilled',
Expand Down
21 changes: 21 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8158,6 +8158,27 @@ exports[`OuiIcon props type spacesApp is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type sparkleFilled is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M7.91667 4.25L9.09518 7.23816L12.0833 8.41667L9.09518 9.59518L7.91667 12.5833L6.73816 9.59518L3.75 8.41667L6.73816 7.23816L7.91667 4.25Z"
/>
<path
d="M7.91667 3.83333C8.08778 3.83333 8.2415 3.93795 8.30428 4.09713L9.41639 6.91694L12.2362 8.02906C12.3954 8.09184 12.5 8.24555 12.5 8.41667C12.5 8.58778 12.3954 8.7415 12.2362 8.80428L9.41639 9.91639L8.30428 12.7362C8.2415 12.8954 8.08778 13 7.91667 13C7.74555 13 7.59184 12.8954 7.52906 12.7362L6.41694 9.91639L3.59713 8.80428C3.43795 8.7415 3.33333 8.58778 3.33333 8.41667C3.33333 8.24555 3.43795 8.09184 3.59713 8.02906L6.41694 6.91694L7.52906 4.09713C7.59184 3.93795 7.74555 3.83333 7.91667 3.83333ZM7.91667 5.38567L7.12577 7.39103C7.08341 7.49841 6.99841 7.58341 6.89103 7.62577L4.88567 8.41667L6.89103 9.20757C6.99841 9.24992 7.08341 9.33492 7.12577 9.44231L7.91667 11.4477L8.70757 9.44231C8.74992 9.33492 8.83492 9.24992 8.94231 9.20757L10.9477 8.41667L8.94231 7.62577C8.83492 7.58341 8.74992 7.49841 8.70757 7.39103L7.91667 5.38567Z"
/>
<path
d="M4.16667 3L4.697 4.13634L5.83333 4.66667L4.697 5.197L4.16667 6.33333L3.63634 5.197L2.5 4.66667L3.63634 4.13634L4.16667 3Z"
/>
</svg>
`;

exports[`OuiIcon props type sqlApp is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
28 changes: 28 additions & 0 deletions src/components/icon/assets/sparkle_filled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

import * as React from 'react';
const OuiIconSparkleFilled = ({ title, titleId, ...props }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}>
{title ? <title id={titleId}>{title}</title> : null}
<path
d="M7.91667 4.25L9.09518 7.23816L12.0833 8.41667L9.09518 9.59518L7.91667 12.5833L6.73816 9.59518L3.75 8.41667L6.73816 7.23816L7.91667 4.25Z" />
<path
d="M7.91667 3.83333C8.08778 3.83333 8.2415 3.93795 8.30428 4.09713L9.41639 6.91694L12.2362 8.02906C12.3954 8.09184 12.5 8.24555 12.5 8.41667C12.5 8.58778 12.3954 8.7415 12.2362 8.80428L9.41639 9.91639L8.30428 12.7362C8.2415 12.8954 8.08778 13 7.91667 13C7.74555 13 7.59184 12.8954 7.52906 12.7362L6.41694 9.91639L3.59713 8.80428C3.43795 8.7415 3.33333 8.58778 3.33333 8.41667C3.33333 8.24555 3.43795 8.09184 3.59713 8.02906L6.41694 6.91694L7.52906 4.09713C7.59184 3.93795 7.74555 3.83333 7.91667 3.83333ZM7.91667 5.38567L7.12577 7.39103C7.08341 7.49841 6.99841 7.58341 6.89103 7.62577L4.88567 8.41667L6.89103 9.20757C6.99841 9.24992 7.08341 9.33492 7.12577 9.44231L7.91667 11.4477L8.70757 9.44231C8.74992 9.33492 8.83492 9.24992 8.94231 9.20757L10.9477 8.41667L8.94231 7.62577C8.83492 7.58341 8.74992 7.49841 8.70757 7.39103L7.91667 5.38567Z" />
<path
d="M4.16667 3L4.697 4.13634L5.83333 4.66667L4.697 5.197L4.16667 6.33333L3.63634 5.197L2.5 4.66667L3.63634 4.13634L4.16667 3Z" />
</svg>
);
export const icon = OuiIconSparkleFilled;
19 changes: 19 additions & 0 deletions src/components/icon/assets/sparkle_filled.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 src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ const typeToPathMap = {
sortRight: 'sortRight',
sortUp: 'sort_up',
spacesApp: 'app_spaces',
sparkleFilled: 'sparkle_filled',
sqlApp: 'app_sql',
starEmpty: 'star_empty',
starEmptySpace: 'star_empty_space',
Expand Down

0 comments on commit 8e104c3

Please sign in to comment.