Closed cesarlevel closed 2 years ago
I have tried to do the same thing but the @redocly/ui module (for importing) in the Footer.tsx and Navbar.tsx could not be found. do you also have to import the Footer.tsx somewhere else or is putting it in the _override folder sufficient enough?
I believe putting it in the _override
folder is sufficient.
Hey adamaltan, thanks. I also found it why it didn't want to override the custom Navbar and Footer. I had to restart my whole application to see the change.
I have a question. Overwriting the NavBar causes it not to be mobile responsive anymore (no hamburger menu anymore). Is there a wrapper we can use to make responsive again and to add the hamburger menu?
@KasraTabrizi Currently the hamburger would be implemented within your custom NavBar component. I've requested a simple example be added here so you can see.
@KasraTabrizi I updated this PR with a basic responsive navbar implementation
@RomanHotsiy
Thanks for the change!
@RomanHotsiy
The responsiveness works as it should but the searchbar lost its search functionality. Is there a props I should set to true for the SearchBox component to enable it again? (e.g. <SearchBox search={true} />
)
@KasraTabrizi
The responsiveness works as it should but the search bar lost its search functionality.
Oh, yes, you should pass pathPrefix
. But it only affects the Redocly Previews. Search should work fine in prod builds.
I updated the PR to show how to pass pathPrefix
, see https://github.com/Redocly/developer-portal-starter/pull/12/commits/498530f0da7978eb04d5222241d3bb3b7a99575a
@RomanHotsiy
It works! Thanks a lot!
A very basic example of overriding the NavBar and the Footer.
preview
Note: The NavBar doesn't have a background if the location is
/
but the preview is not showing this