Skip to content

Commit

Permalink
fix(FEC-13915): Add Audio Icon (#53)
Browse files Browse the repository at this point in the history
Co-authored-by: JonathanTGold <jonathan.gold@[email protected]>
  • Loading branch information
JonathanTGold and JonathanTGold authored Jul 31, 2024
1 parent e058c69 commit 68164f0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/icon/icon-utils.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {h, ComponentChildren} from 'preact';
import { Icon } from "./index";
import { h, ComponentChildren } from 'preact';
import { Icon } from './index';

export const IconType = {
// PDF
Expand All @@ -24,7 +24,8 @@ export const IconType = {
XLS: 'xls',
XLSX: 'xlsx',
CSV: 'csv',
ODS: 'ods'
ODS: 'ods',
AUDIO: 'audio'
};

export const getIconByFileExt = (fileExt: string): ComponentChildren => {
Expand All @@ -45,6 +46,8 @@ export const getIconByFileExt = (fileExt: string): ComponentChildren => {
case IconType.PNG:
case IconType.SVG:
return <Icon name={'image'} />;
case IconType.AUDIO:
return <Icon name={'audio'} />;
case IconType.ZIP:
return <Icon name={'zip'} />;
case IconType.XLS:
Expand Down
12 changes: 12 additions & 0 deletions src/icon/icons/audio.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { h } from 'preact';

export const Audio = () => (
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M10.5 4.5C10.5 3.67157 11.1716 3 12 3C12.8284 3 13.5 3.67157 13.5 4.5V19.5C13.5 20.3284 12.8284 21 12 21C11.1716 21 10.5 20.3284 10.5 19.5V4.5ZM4.5 9C4.5 8.17157 5.17157 7.5 6 7.5C6.82843 7.5 7.5 8.17157 7.5 9V15C7.5 15.8284 6.82843 16.5 6 16.5C5.17157 16.5 4.5 15.8284 4.5 15V9ZM18 7.5C17.1716 7.5 16.5 8.17157 16.5 9V15C16.5 15.8284 17.1716 16.5 18 16.5C18.8284 16.5 19.5 15.8284 19.5 15V9C19.5 8.17157 18.8284 7.5 18 7.5Z"
fill="white"
/>
</svg>
);
4 changes: 3 additions & 1 deletion src/icon/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { VolumeMute } from './volumeMute';
import { Spinner } from './spinner';
import { Detach } from './detach';
import { Attach } from './attach';
import { Audio } from './audio';

export const Icons: Record<string, () => h.JSX.Element> = {
close: Close,
Expand Down Expand Up @@ -68,5 +69,6 @@ export const Icons: Record<string, () => h.JSX.Element> = {
volumeMute: VolumeMute,
spinner: Spinner,
detach: Detach,
attach: Attach
attach: Attach,
audio: Audio
};

0 comments on commit 68164f0

Please sign in to comment.