1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

css grid to pack my layout

This commit is contained in:
muerwre 2019-04-02 17:25:50 +07:00
parent 44e10599d7
commit debb0640da
20 changed files with 1212 additions and 23 deletions

View file

@ -6,30 +6,22 @@ import { SomeComponent } from '$components/SomeComponent';
import { ConnectedRouter } from "connected-react-router";
import { history } from "$redux/store";
import { NavLink, Switch, Route } from 'react-router-dom';
import { MainLayout } from "$containers/MainLayout";
import { FlowLayout } from "$containers/FlowLayout";
interface IAppProps {}
interface IAppState {}
class Component extends React.Component<IAppProps, IAppState> {
state = { };
render() {
return (
<ConnectedRouter history={history}>
<div>
<div>
<NavLink exact to="/" activeClassName="active">
Root
</NavLink>
<NavLink to="/somepath" activeClassName="active">
Something
</NavLink>
</div>
<Switch>
<Route
exact
path="/"
component={SomeComponent}
component={FlowLayout}
/>
<Route
path="/somepath"

View file

@ -0,0 +1,13 @@
import * as React from 'react';
import { MainLayout } from "$containers/MainLayout";
import { HeroPlaceholder } from "$components/flow/HeroPlaceholder";
import { TestGrid } from "$components/flow/TestGrid";
// const style = require('./style.scss');
export const FlowLayout = () => (
<MainLayout>
<div className="default_container content_container">
<TestGrid />
</div>
</MainLayout>
);

View file

@ -0,0 +1,11 @@
import * as React from 'react';
import { Header } from "$components/main/Header";
const style = require('./style.scss');
export const MainLayout = ({ children }) => (
<div className={style.wrapper}>
<Header />
{children}
</div>
);

View file

@ -0,0 +1,4 @@
.wrapper {
width: 100%;
//padding: $gap 0;
}