components
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
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
- [X] I agree to follow this project's Code of Conduct
- [X] I checked the current issues for duplicate requests
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!
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.