You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sbasken I believe you installed React Icons for the admonitions. How can we use them elsewhere on the site?
Particularly the sidebar
futuresoup
changed the title
Implement React Icons in menu, body, etc.
Implement React Icons in the Sidebar - potentially other parts of the site as well
Jan 24, 2024
@futuresoup To use react-icons, you can simply import the library in other component files you want to use but since sidebar is a Docusaurus built in component, you would first need to run npm run swizzle, eject DocSidebarItem component from @docusaurus/theme-classic. Once you have the component in the src/theme folder, you should be able to import react icon in the index.js file like below:
This will generate the same icon for every item on the side bar so we would have to use if statement to generate different icons if you want to use different ones.
The text was updated successfully, but these errors were encountered: