| 1 |
import { pfIcons } from '@patternfly/patternfly/icons/pficons.mjs'; |
| 2 |
|
| 3 |
const renaming = { |
| 4 |
save: 'save-alt', |
| 5 |
'folder-open': 'folder-open-alt', |
| 6 |
edit: 'edit-alt', |
| 7 |
print: 'print-alt', |
| 8 |
spinner: 'spinner-alt', |
| 9 |
home: 'home-alt', |
| 10 |
memory: 'memory-alt', |
| 11 |
server: 'server-alt', |
| 12 |
user: 'user-sec', |
| 13 |
users: 'users-alt', |
| 14 |
info: 'info-alt', |
| 15 |
filter: 'filter-alt' |
| 16 |
}; |
| 17 |
|
| 18 |
/** |
| 19 |
* @param {object} icons Icons like { screen: { "width": 1024, "height": 1024, "svgPathData": "" } } |
| 20 |
*/ |
| 21 |
function convertIcons(icons) { |
| 22 |
delete icons.history; |
| 23 |
|
| 24 |
Object.entries(renaming).forEach(([oldKey, newKey]) => { |
| 25 |
icons[newKey] = icons[oldKey]; |
| 26 |
delete icons[oldKey]; |
| 27 |
}); |
| 28 |
|
| 29 |
return icons; |
| 30 |
} |
| 31 |
|
| 32 |
const patternflyIcons = convertIcons(pfIcons); |
| 33 |
export default patternflyIcons; |