feat(Flash): Add initial ui
This commit is contained in:
@ -10,6 +10,7 @@ import {
|
|||||||
isSignedInSelector
|
isSignedInSelector
|
||||||
} from './redux';
|
} from './redux';
|
||||||
|
|
||||||
|
import Flash from './Flash';
|
||||||
import Nav from './Nav';
|
import Nav from './Nav';
|
||||||
import Toasts from './Toasts';
|
import Toasts from './Toasts';
|
||||||
import NotFound from './NotFound';
|
import NotFound from './NotFound';
|
||||||
@ -60,12 +61,9 @@ export class FreeCodeCamp extends React.Component {
|
|||||||
route
|
route
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const Child = routes[route] || NotFound;
|
const Child = routes[route] || NotFound;
|
||||||
// we render nav after the content
|
|
||||||
// to allow the panes to update
|
|
||||||
// redux store, which will update the bin
|
|
||||||
// buttons in the nav
|
|
||||||
return (
|
return (
|
||||||
<div className={ `${ns}-container` }>
|
<div className={ `${ns}-container` }>
|
||||||
|
<Flash />
|
||||||
<Nav />
|
<Nav />
|
||||||
<Child />
|
<Child />
|
||||||
<Toasts />
|
<Toasts />
|
||||||
|
21
common/app/Flash/Flash.jsx
Normal file
21
common/app/Flash/Flash.jsx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { CloseButton } from 'react-bootstrap';
|
||||||
|
|
||||||
|
import ns from './ns.json';
|
||||||
|
|
||||||
|
const propTypes = {};
|
||||||
|
export default function Flash() {
|
||||||
|
return (
|
||||||
|
<div className={`${ns}-container bg-info`}>
|
||||||
|
<div className={`${ns}-content`}>
|
||||||
|
<div>
|
||||||
|
Content
|
||||||
|
</div>
|
||||||
|
<CloseButton />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Flash.displayName = 'Flash';
|
||||||
|
Flash.propTypes = propTypes;
|
10
common/app/Flash/flash.less
Normal file
10
common/app/Flash/flash.less
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
@ns: flash;
|
||||||
|
|
||||||
|
.@{ns}-container {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.@{ns}-content {
|
||||||
|
.center(@value: @container-md, @padding: @grid-gutter-width);
|
||||||
|
.row(@justify: around);
|
||||||
|
}
|
1
common/app/Flash/index.js
Normal file
1
common/app/Flash/index.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
export { default } from './Flash.jsx';
|
1
common/app/Flash/ns.json
Normal file
1
common/app/Flash/ns.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
"flash"
|
1
common/app/Flash/redux/index.js
Normal file
1
common/app/Flash/redux/index.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
@ -1,4 +1,5 @@
|
|||||||
&{ @import "./app.less"; }
|
&{ @import "./app.less"; }
|
||||||
&{ @import "./Map/map.less"; }
|
&{ @import "./Map/map.less"; }
|
||||||
&{ @import "./Nav/nav.less"; }
|
&{ @import "./Nav/nav.less"; }
|
||||||
|
&{ @import "./Flash/flash.less"; }
|
||||||
&{ @import "./routes/index.less"; }
|
&{ @import "./routes/index.less"; }
|
||||||
|
Reference in New Issue
Block a user