Josh Gust
Josh Gust

Reputation: 4445

How do hub icons change according to the theme in azure devops?

I'm designing a hub extension for Azure DevOps and want to have an icon that follows the feel of the existing hub icon groups.

enter image description here enter image description here

What do I need to do to get my icon to behave like these others when themes (particularly light vs dark) are applied?

Upvotes: 2

Views: 290

Answers (1)

Flex
Flex

Reputation: 577

In contrast to the documentation here (which doesn't even work), it's quite simple. In your extensions manifest specify the icons as follows:

{
    "id": "hub",
    "type": "ms.vss-web.hub",
    "targets": [
        "ms.vss-work-web.work-hub-group"
    ],
    "properties": {
        "name": "Hub",
        "description": "Something",
        "uri": "pages/Hub.html",
        "icon": {
            "light": "img/hub-light.png",
            "dark": "img/hub-dark.png"
        }
    }
}

Upvotes: 1

Related Questions