navigation
navigation copied to clipboard
AsideHeader component intagration to a gravity-ui-vite-example
Hi! I'm new newcomer and need some help. I can't run the AsideHeader component at the gravity-ui-vite-example. How can I do it?
@MrDotRu Hi! Possibly versions of the packages are not compatible in your example. @gravity-ui/[email protected] requires to install @gravity-ui/[email protected]
I hope my example helps you. I'll also update packages in gravity-ui-vite-example and place navigation example there
(https://github.com/gravity-ui/gravity-ui-vite-example/pull/4, https://github.com/gravity-ui/gravity-ui-vite-example/pull/5)
package.json
"dependencies": {
"@gravity-ui/icons": "^2.6.0",
"@gravity-ui/navigation": "^1.10.3",
"@gravity-ui/uikit": "^5.17.0",
"bem-cn-lite": "^4.1.0"
},
App.tsx
import {InfoButtons} from './components/InfoButtons';
import {Wrapper} from './components/Wrapper';
import {AsideHeader} from '@gravity-ui/navigation';
import {Bug} from '@gravity-ui/icons';
const App = () => {
return (
<AsideHeader
logo={{
text:"helpme",
icon: Bug,
}}
compact={true}
renderContent={() => ( <Wrapper>
<InfoButtons />
</Wrapper>)}
/>
);
};
export default App;