Skip to content

Commit f9c370c

Browse files
authored
Page Layouts - Added data collection layout (#4652)
* Create layouts route in demo-app * Added RoutedAnchor component * Started data collection page layout * Progress on data collection layout * Added VM data * Refactor * customize columns based on cloud type * Refactoring * Adjust Grid content alignment * Added back button * Added lines at end of files and small refactor * remove excessive line
1 parent 8f11660 commit f9c370c

File tree

16 files changed

+781
-0
lines changed

16 files changed

+781
-0
lines changed

sandbox/grommet-app/src/App.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Home from './pages/index';
77
import NextDashboard from './pages/next/index';
88
import StickerSheet from './pages/sticker-sheet/index';
99
import Refresh from './pages/refresh/index';
10+
import { Layouts, routes as layoutRoutes } from './pages/layouts';
1011
import { Login } from './Login';
1112
import { GlobalHeader } from './components/GlobalHeader';
1213
import { FloatingActionButton } from './components';
@@ -104,6 +105,8 @@ const App = () => {
104105
<Route path="/sustainability" element={<Sustainability />} />
105106
<Route path="/sticker-sheet" element={<StickerSheet />} />
106107
<Route path="/refresh" element={<Refresh />} />
108+
<Route path="/layouts" element={<Layouts />} />
109+
{layoutRoutes}
107110
</Routes>
108111
</BrowserRouter>
109112
{window.location.pathname === '/next' ? (
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react';
2+
import { Anchor } from 'grommet';
3+
4+
interface RoutedAnchorProps extends React.ComponentProps<typeof Anchor> {
5+
to: string;
6+
}
7+
8+
export const RoutedAnchor = ({ ...rest }: RoutedAnchorProps) => (
9+
<Anchor {...rest} />
10+
);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './RoutedAnchor';

sandbox/grommet-app/src/components/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ export * from './ContentPane';
77
export * from './GlobalHeader';
88
export * from './ToggleGroup';
99
export * from './FloatingActionButton';
10+
export * from './RoutedAnchor';
1011
export * from './SkeletonContext';

0 commit comments

Comments
 (0)