1
0
mirror of https://github.com/mgerb/react-starter synced 2026-01-10 09:02:49 +00:00

formatting

This commit is contained in:
2017-08-26 21:23:05 -05:00
parent cc0be44b54
commit 689d1b4df0
10 changed files with 115 additions and 133 deletions

View File

@@ -8,16 +8,11 @@ import NotFound from './pages/NotFound/NotFound';
//styling //styling
import './scss/index.scss'; import './scss/index.scss';
interface Props { interface Props {}
} interface State {}
interface State {
}
export default class Wrapper extends React.Component<Props, State> { export default class Wrapper extends React.Component<Props, State> {
render() { render() {
return ( return (
<BrowserRouter> <BrowserRouter>

View File

@@ -3,5 +3,4 @@ import ReactDOM from 'react-dom';
import Wrapper from './Wrapper'; import Wrapper from './Wrapper';
ReactDOM.render( <Wrapper/> ReactDOM.render(<Wrapper />, document.getElementById('app'));
, document.getElementById('app'));

View File

@@ -33,7 +33,6 @@
& + .Navbar__item { & + .Navbar__item {
border-left: 1px solid $light3; border-left: 1px solid $light3;
} }
} }
.Navbar__item--active { .Navbar__item--active {

View File

@@ -3,16 +3,11 @@ import { NavLink } from 'react-router-dom';
import './Navbar.scss'; import './Navbar.scss';
interface Props { interface Props {}
} interface State {}
interface State {
}
export default class Navbar extends React.Component<Props, State> { export default class Navbar extends React.Component<Props, State> {
constructor(props: Props) { constructor(props: Props) {
super(props); super(props);
} }
@@ -22,17 +17,31 @@ export default class Navbar extends React.Component<Props, State> {
<div className="Navbar"> <div className="Navbar">
<div className="Navbar__header"> <div className="Navbar__header">
<span>React Starter</span> <span>React Starter</span>
<a href="https://github.com/mgerb/react-webpack2-seed">GitHub <a href="https://github.com/mgerb/react-webpack2-seed">
GitHub
<i className="fa fa-github" aria-hidden="true" /> <i className="fa fa-github" aria-hidden="true" />
</a> </a>
</div> </div>
<div className="Navbar__nav"> <div className="Navbar__nav">
<NavLink to="/" className="Navbar__item" exact activeClassName="Navbar__item--active">Home</NavLink> <NavLink
<NavLink to="/new" className="Navbar__item" exact activeClassName="Navbar__item--active">New</NavLink> to="/"
className="Navbar__item"
exact
activeClassName="Navbar__item--active"
>
Home
</NavLink>
<NavLink
to="/new"
className="Navbar__item"
exact
activeClassName="Navbar__item--active"
>
New
</NavLink>
</div> </div>
</div> </div>
); );
} }
} }

View File

@@ -3,26 +3,16 @@ import { RouteComponentProps } from 'react-router-dom';
import './Home.scss'; import './Home.scss';
interface Props extends RouteComponentProps<any> { interface Props extends RouteComponentProps<any> {}
} interface State {}
interface State {
}
export default class Home extends React.Component<Props, State> { export default class Home extends React.Component<Props, State> {
constructor(props: Props) { constructor(props: Props) {
super(props); super(props);
} }
render() { render() {
return ( return <div className="Home">test 123</div>;
<div className="Home">
test 123
</div>
);
} }
} }

View File

@@ -3,26 +3,16 @@ import { RouteComponentProps } from 'react-router-dom';
import './NotFound.scss'; import './NotFound.scss';
interface Props extends RouteComponentProps<any> { interface Props extends RouteComponentProps<any> {}
} interface State {}
interface State {
}
export default class NotFound extends React.Component<Props, State> { export default class NotFound extends React.Component<Props, State> {
constructor(props: Props) { constructor(props: Props) {
super(props); super(props);
} }
render() { render() {
return ( return <div className="NotFound">404 Not Found</div>;
<div className="NotFound">
404 Not Found
</div>
);
} }
} }