mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
try fixing theme / table issues with mui@next
This commit is contained in:
parent
805e404184
commit
e01a3b27d2
1 changed files with 15 additions and 13 deletions
|
|
@ -1,14 +1,13 @@
|
|||
import * as React from "react";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
import "isomorphic-fetch";
|
||||
import darkBaseTheme from "material-ui/styles/baseThemes/darkBaseTheme";
|
||||
import MuiThemeProvider from "material-ui/styles/MuiThemeProvider";
|
||||
import getMuiTheme from "material-ui/styles/getMuiTheme";
|
||||
import {
|
||||
Table,
|
||||
TableHead,
|
||||
TableBody,
|
||||
TableRow,
|
||||
TableRowColumn,
|
||||
TableCell,
|
||||
} from "material-ui";
|
||||
|
||||
interface IFilterListsState {
|
||||
|
|
@ -16,6 +15,12 @@ interface IFilterListsState {
|
|||
loading: boolean;
|
||||
}
|
||||
|
||||
interface IFilterList {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsState> {
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
|
|
@ -35,7 +40,7 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
|
|||
: Home.renderFilterListsTable(this.state.filterLists);
|
||||
|
||||
return <div>
|
||||
<MuiThemeProvider muiTheme={getMuiTheme(darkBaseTheme)}>
|
||||
<MuiThemeProvider>
|
||||
{contents}
|
||||
</MuiThemeProvider>
|
||||
</div>;
|
||||
|
|
@ -43,21 +48,18 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
|
|||
|
||||
private static renderFilterListsTable(filterLists: IFilterList[]) {
|
||||
return <Table>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell>List</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{filterLists.map(filterList =>
|
||||
<TableRow key={filterList.id}>
|
||||
<TableRowColumn>
|
||||
<h2>{filterList.name}</h2>{filterList.description}
|
||||
</TableRowColumn>
|
||||
<TableCell><h2>{filterList.name}</h2>{filterList.description}</TableCell>
|
||||
</TableRow>
|
||||
)}
|
||||
</TableBody>
|
||||
</Table>;
|
||||
}
|
||||
}
|
||||
|
||||
interface IFilterList {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
Loading…
Reference in a new issue