canonical / react-components

A set of components based on Vanilla Framework
https://canonical.github.io/react-components
95 stars 51 forks source link

Add a way to use the newer tag logo in the side navigation #1114

Closed steverydz closed 3 weeks ago

steverydz commented 3 weeks ago

Currently the application layout supports the old style logo which is an icon next to the word mark. Most of our sites and applications are now moving to using the tag style logo (see screenshot below).

This isn't specifically a problem with the React component as it comes straight from the Vanilla component, however it's not possible to customise/override the logo in this component. Perhaps having an option to enable the tag style icon would be a solution to this?

app-layout-logo

huwshimi commented 3 weeks ago

The current workaround is to pass a ReactNode that contains the logo to the logo prop. You can see how we do this in Juju Dashboard:

https://github.com/canonical/juju-dashboard/blob/b3fb186bef033f07526dd42e5249737488fb6cd9/src/layout/BaseLayout/BaseLayout.tsx#L61-L66

The related issue in Vanilla: https://github.com/canonical/vanilla-framework/issues/5014.

steverydz commented 3 weeks ago

@huwshimi Thanks, that's helpful. I've tried that and it works. I'll close this issue.