2017-05-06 13:02:06 -04:00
|
|
|
import cancelSVG from 'icons/_icon_action_cancel.svg';
|
|
|
|
import retrySVG from 'icons/_icon_action_retry.svg';
|
|
|
|
import playSVG from 'icons/_icon_action_play.svg';
|
2017-05-08 10:53:54 -04:00
|
|
|
import stopSVG from 'icons/_icon_action_stop.svg';
|
2017-05-06 13:02:06 -04:00
|
|
|
|
2017-05-11 07:33:05 -04:00
|
|
|
/**
|
|
|
|
* For the provided action returns the respective SVG
|
|
|
|
*
|
|
|
|
* @param {String} action
|
|
|
|
* @return {SVG|String}
|
|
|
|
*/
|
2017-05-06 13:02:06 -04:00
|
|
|
export default function getActionIcon(action) {
|
2017-05-11 07:33:05 -04:00
|
|
|
const icons = {
|
|
|
|
icon_action_cancel: cancelSVG,
|
|
|
|
icon_action_play: playSVG,
|
|
|
|
icon_action_retry: retrySVG,
|
|
|
|
icon_action_stop: stopSVG,
|
|
|
|
};
|
2017-05-06 13:02:06 -04:00
|
|
|
|
2017-05-11 07:33:05 -04:00
|
|
|
return icons[action] || '';
|
2017-05-06 13:02:06 -04:00
|
|
|
}
|