Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsideHeader component intagration to a gravity-ui-vite-example #326

Open
MrDotRu opened this issue Oct 17, 2024 · 1 comment
Open

AsideHeader component intagration to a gravity-ui-vite-example #326

MrDotRu opened this issue Oct 17, 2024 · 1 comment

Comments

@MrDotRu
Copy link

MrDotRu commented Oct 17, 2024

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?

@Lunory
Copy link
Collaborator

Lunory commented Oct 18, 2024

@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
(gravity-ui/gravity-ui-vite-example#4, gravity-ui/gravity-ui-vite-example#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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants