Skip to content

Commit

Permalink
feat: add AsideHeader (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunory authored Dec 19, 2024
1 parent 39839cf commit 1ef44e2
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 68 deletions.
7 changes: 2 additions & 5 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Scripts,
ScrollRestoration as ScrollRestorationRemix,
} from '@remix-run/react';
import {getInitialRootClassName} from '@gravity-ui/uikit';
import {DEFAULT_BODY_CLASSNAME} from './components/Wrapper';

import './styles/globals.scss';
import '@gravity-ui/uikit/styles/fonts.css';
Expand All @@ -20,9 +20,6 @@ export const meta: MetaFunction = () => [
},
];

const theme = 'dark';
const rootClassName = getInitialRootClassName({theme});

const App = () => {
return (
<html lang="en">
Expand All @@ -32,7 +29,7 @@ const App = () => {
<Meta />
<Links />
</head>
<body className={rootClassName}>
<body className={DEFAULT_BODY_CLASSNAME}>
<Outlet />
<ScrollRestorationRemix />
<Scripts />
Expand Down
16 changes: 13 additions & 3 deletions app/routes/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import {Ghost} from '@gravity-ui/icons';
import {AsideHeader} from '@gravity-ui/navigation';

import {InfoButtons} from '../components/InfoButtons';
import {Wrapper} from '../components/Wrapper';

const Index = () => {
return (
<Wrapper>
<InfoButtons />
</Wrapper>
<AsideHeader
logo={{icon: Ghost, text: 'remix-example'}}
compact={true}
hideCollapseButton={true}
renderContent={() => (
<Wrapper>
<InfoButtons />
</Wrapper>
)}
/>
);
};

Expand Down
Loading

0 comments on commit 1ef44e2

Please sign in to comment.