components icon indicating copy to clipboard operation
components copied to clipboard

more props to TopNavigationProps.Logo with the ability to control the size and a svg source for a custom identity logo icon

Open dpitcock opened this issue 1 year ago • 2 comments

Description

add svg pro of the type ReactNode to the TopNavigationProps.Logo type. The svg being a slot and overrides any src and passed to the icon. Perhaps a props for height and width to allow for size customization of the custom icon. https://cloudscape.design/components/icon?tabId=api#slots

Code of Conduct

dpitcock avatar Feb 15 '24 19:02 dpitcock

Hello Dennis,

You can use the SVG file directly on the top navigation slot, as per our playground example. This should provide you with more control over its size and offers an href property to add a link to it.

Let me know if that helps.

Thank you!

rubencarvalho avatar Feb 19 '24 11:02 rubencarvalho

That could work if we deployed our assets and then grabbed them from a s3 bucket or something. Importing them from a relative path did not work, because our package gets bundled and used by others. So the resolution that worked for me was to base64 encode the icon, save that string as a variable and use that in the src.

dpitcock avatar Feb 22 '24 13:02 dpitcock