Fix code style inconsistencies

This commit is contained in:
SteveSandersonMS
2016-02-24 18:37:47 +00:00
parent c668387dac
commit c1b808f8af
6 changed files with 31 additions and 31 deletions

View File

@@ -4,7 +4,7 @@ interface CounterState {
currentCount: number; currentCount: number;
} }
export class Counter extends React.Component<void, CounterState> { export class Counter extends React.Component<any, CounterState> {
constructor() { constructor() {
super(); super();
this.state = { currentCount: 0 }; this.state = { currentCount: 0 };

View File

@@ -5,7 +5,7 @@ interface FetchDataExampleState {
loading: boolean; loading: boolean;
} }
export class FetchData extends React.Component<void, FetchDataExampleState> { export class FetchData extends React.Component<any, FetchDataExampleState> {
constructor() { constructor() {
super(); super();
this.state = { forecasts: [], loading: true }; this.state = { forecasts: [], loading: true };
@@ -31,7 +31,7 @@ export class FetchData extends React.Component<void, FetchDataExampleState> {
} }
private static renderForecastsTable(forecasts: WeatherForecast[]) { private static renderForecastsTable(forecasts: WeatherForecast[]) {
return <table className="table"> return <table className='table'>
<thead> <thead>
<tr> <tr>
<th>Date</th> <th>Date</th>

View File

@@ -1,15 +1,15 @@
import * as React from 'react'; import * as React from 'react';
export class Home extends React.Component<void, void> { export class Home extends React.Component<any, void> {
public render() { public render() {
return <div> return <div>
<h1>Hello, world!</h1> <h1>Hello, world!</h1>
<p>Welcome to your new single-page application, built with:</p> <p>Welcome to your new single-page application, built with:</p>
<ul> <ul>
<li><a href="https://get.asp.net/">ASP.NET Core</a> and <a href="https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx">C#</a> for cross-platform server-side code</li> <li><a href='https://get.asp.net/'>ASP.NET Core</a> and <a href='https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx'>C#</a> for cross-platform server-side code</li>
<li><a href="https://facebook.github.io/react/">React</a> and <a href="http://www.typescriptlang.org/">TypeScript</a> for client-side code</li> <li><a href='https://facebook.github.io/react/'>React</a> and <a href='http://www.typescriptlang.org/'>TypeScript</a> for client-side code</li>
<li><a href="https://webpack.github.io/">Webpack</a> for building and bundling client-side resources</li> <li><a href='https://webpack.github.io/'>Webpack</a> for building and bundling client-side resources</li>
<li><a href="http://getbootstrap.com/">Bootstrap</a> for layout and styling</li> <li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
</ul> </ul>
<p>To help you get started, we've also set up:</p> <p>To help you get started, we've also set up:</p>
<ul> <ul>

View File

@@ -7,12 +7,12 @@ export interface LayoutProps {
export class Layout extends React.Component<LayoutProps, void> { export class Layout extends React.Component<LayoutProps, void> {
public render() { public render() {
return <div className="container-fluid"> return <div className='container-fluid'>
<div className="row"> <div className='row'>
<div className="col-sm-3"> <div className='col-sm-3'>
<NavMenu /> <NavMenu />
</div> </div>
<div className="col-sm-9"> <div className='col-sm-9'>
{ this.props.body } { this.props.body }
</div> </div>
</div> </div>

View File

@@ -1,35 +1,35 @@
import * as React from 'react'; import * as React from 'react';
import { Link } from 'react-router'; import { Link } from 'react-router';
export class NavMenu extends React.Component<void, void> { export class NavMenu extends React.Component<any, void> {
public render() { public render() {
return <div className="main-nav"> return <div className='main-nav'>
<div className="navbar navbar-inverse"> <div className='navbar navbar-inverse'>
<div className="navbar-header"> <div className='navbar-header'>
<button type="button" className="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <button type='button' className='navbar-toggle' data-toggle='collapse' data-target='.navbar-collapse'>
<span className="sr-only">Toggle navigation</span> <span className='sr-only'>Toggle navigation</span>
<span className="icon-bar"></span> <span className='icon-bar'></span>
<span className="icon-bar"></span> <span className='icon-bar'></span>
<span className="icon-bar"></span> <span className='icon-bar'></span>
</button> </button>
<Link className="navbar-brand" to={ '/' }>WebApplicationBasic</Link> <Link className='navbar-brand' to={ '/' }>WebApplicationBasic</Link>
</div> </div>
<div className="clearfix"></div> <div className='clearfix'></div>
<div className="navbar-collapse collapse"> <div className='navbar-collapse collapse'>
<ul className="nav navbar-nav"> <ul className='nav navbar-nav'>
<li> <li>
<Link to={ '/' } activeClassName='active'> <Link to={ '/' } activeClassName='active'>
<span className="glyphicon glyphicon-home"></span> Home <span className='glyphicon glyphicon-home'></span> Home
</Link> </Link>
</li> </li>
<li> <li>
<Link to={ '/counter' } activeClassName='active'> <Link to={ '/counter' } activeClassName='active'>
<span className="glyphicon glyphicon-education"></span> Counter <span className='glyphicon glyphicon-education'></span> Counter
</Link> </Link>
</li> </li>
<li> <li>
<Link to={ '/fetchdata' } activeClassName='active'> <Link to={ '/fetchdata' } activeClassName='active'>
<span className="glyphicon glyphicon-th-list"></span> Fetch data <span className='glyphicon glyphicon-th-list'></span> Fetch data
</Link> </Link>
</li> </li>
</ul> </ul>

View File

@@ -6,7 +6,7 @@ import { FetchData } from './components/FetchData';
import { Counter } from './components/Counter'; import { Counter } from './components/Counter';
export const routes = <Route component={ Layout }> export const routes = <Route component={ Layout }>
<Route path="/" components={{ body: Home }} /> <Route path='/' components={{ body: Home }} />
<Route path="/counter" components={{ body: Counter }} /> <Route path='/counter' components={{ body: Counter }} />
<Route path="/fetchdata" components={{ body: FetchData }} /> <Route path='/fetchdata' components={{ body: FetchData }} />
</Route>; </Route>;