Dev doc `"undefined"` background image selection got interpreted as a string
Closed this issue · 5 comments
Describe the bug / expected behavior
For components with a backgroundImage
prop, such as the Drawer Header and App Bar, whenever the backgroundImage prop is set to "undefined" in the playground dropdown selection, the console flashes a 404 warning because it cannot locate an image called "undefined".
What are the steps to reproduce?
- Go to Dev Doc drawer header or Dev Doc Appbar
- Open the console
Screenshot
Suggested fix
Likely a wrong interpretation on the dev doc side to retrieve a non-existent image located at "https://brightlayer-ui-components.github.io/react-dev/undefined"
We might need to change this switch statement so that when the background image is a string literal "undefined"
, we actually pass undefined
to our components
blui-react-component-library/docs/src/shared/utilities.tsx
Lines 158 to 169 in 7487148
Anything else to add?
The icons dropdown selection seems to be working fine. This issue only exists for the background image selection.
@huayunh I'm unable to reproduce this issue today.
Odd I have no issues on chrome or firefox. (locally that is, haha. I see its on the deployed site)
undefined-image.mov
closing this issue, it has been fixed. This is latest from dev on PR deploy ( T-minus 48hrs and it will be gone)
https://blui-react-docs--pr743-bug-fix-undefined-im-ipix60vz.web.app/components/app-bar/playground
https://blui-react-docs--pr743-bug-fix-undefined-im-ipix60vz.web.app/components/drawer-header/playground
This is haunting me