Skip to content

Commit

Permalink
Add shield icon (#1789)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviadendinger authored Oct 19, 2023
1 parent 2379e3d commit aeaa532
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stencil-workspace/src/components/icons/IconMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import { IconCaretUp } from './icon-caret-up';
import { IconExport } from './icon-export';
import { IconHistory } from './icon-history';
import { IconPencil } from './icon-pencil';
import { IconShield } from './icon-shield';

export interface IconProps {
color?: string;
Expand Down Expand Up @@ -168,6 +169,8 @@ export const IconMap: FunctionalComponent<IconMapProps> = (props: IconMapProps)
return <IconExport color={props.color} onClick={props.onClick} size={props.size} />;
case 'pencil':
return <IconPencil color={props.color} onClick={props.onClick} size={props.size} />;
case 'shield':
return <IconShield color={props.color} onClick={props.onClick} size={props.size} />;
default:
return <img src={props.icon} {...(props.imageOptions || {})} />;
}
Expand Down
21 changes: 21 additions & 0 deletions stencil-workspace/src/components/icons/icon-shield.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// eslint-disable-next-line
import { FunctionalComponent, h } from '@stencil/core';
import { IconProps } from './IconMap';

export const IconShield: FunctionalComponent<IconProps> = (
props: IconProps
) => (
<svg
class={`icon-shield ${props.pressed ? 'pressed' : ''}`}
height={props.size ?? 16}
width={props.size ?? 16}
onClick={props.onClick ? (event) => props.onClick(event) : null}
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
fill={props.color ?? 'currentColor'}
d="m19.87 5.36-7.1-3.19a2.001 2.001 0 0 0-1.57-.04L4.17 4.87c-.43.17-.69.6-.63 1.05l.26 1.91c.73 5.39 3.41 10.33 7.53 13.92.19.16.42.24.66.24s.47-.08.66-.24c4.13-3.58 6.83-8.52 7.59-13.91l.2-1.44a.98.98 0 0 0-.58-1.04Zm-1.61 2.2c-.65 4.62-2.87 8.88-6.27 12.09V4.02l6.36 2.86-.1.69Z"
/>
</svg>
);
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const iconNames = [
'refresh',
'remove',
'search',
'shield',
'sort-a-z',
'sort-z-a',
'sun',
Expand Down

0 comments on commit aeaa532

Please sign in to comment.