mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
20 lines
279 B
JavaScript
20 lines
279 B
JavaScript
const parseIcon = (ctx, i) => {
|
|
if (i.res === 'Empty') {
|
|
return null;
|
|
}
|
|
const res = {
|
|
type: i.res || null,
|
|
title: i.text || i.txt || i.txtS || null,
|
|
};
|
|
if (i.fg) {
|
|
res.fgColor = i.fg;
|
|
}
|
|
if (i.bg) {
|
|
res.bgColor = i.bg;
|
|
}
|
|
return res;
|
|
};
|
|
|
|
export {
|
|
parseIcon,
|
|
};
|