Created
January 15, 2021 19:00
-
-
Save prantlf/7e82dd257db9bee10ee108134dd3a97e to your computer and use it in GitHub Desktop.
How to assign a custom icon to a specific subtype.
This file contains 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
src/icons/images/mytype.svg: | |
The icon image content. | |
src/icons/icons.css: | |
.binf-widgets .myext-mytype { | |
background-image: url('images/mytype.svg'); | |
} | |
src/icons/icons.js: | |
define([ | |
'css!myext/icons/icons' | |
], function () { | |
return [ | |
{ | |
equals: { type: 12345 } | |
} | |
]; | |
}); | |
src/myext-extensions.json: | |
{ | |
"csui/utils/nodesprites": { | |
"extensions": { | |
"myext": [ | |
"myext/icons/icons" | |
] | |
} | |
}, | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment