Created
January 13, 2020 23:02
-
-
Save pfftdammitchris/018730d6f42aa06499264a6dbdd16f48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { | |
EditIcon, | |
DeleteIcon, | |
ResetIcon, | |
TrashIcon, | |
UndoIcon, | |
} from '../lib/icons' | |
import * as utils from '../utils | |
export const audioExts = ['mp3', 'mpa', 'ogg', 'wav'] | |
const icons = { | |
edit: { | |
component: EditIcon, | |
onClick: () => window.alert('You clicked the edit component'), | |
name: 'edit', | |
}, | |
delete: { | |
component: DeleteIcon, | |
name: 'delete', | |
}, | |
// Audio icons | |
// IIFE returning an object | |
...(function() { | |
return audioExts.reduce((acc, ext) => { | |
acc[ext] = { | |
component: MdAudiotrack, | |
title: 'Audio Track', | |
} | |
return acc | |
})(), | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment