-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: create TableWrapper component, restructure goa data
- Loading branch information
1 parent
22ab29a
commit ba61d12
Showing
4 changed files
with
83 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// @flow | ||
import React from "react" | ||
import { withStyles } from "@material-ui/core/styles" | ||
import Table from "@material-ui/core/Table" | ||
import TableBody from "@material-ui/core/TableBody" | ||
import Paper from "@material-ui/core/Paper" | ||
|
||
const styles = theme => ({ | ||
root: { | ||
width: "100%", | ||
}, | ||
table: { | ||
borderBottom: "1px dotted #A3BAE9", | ||
}, | ||
}) | ||
|
||
type Props = { | ||
/** Material-UI styling */ | ||
classes: Object, | ||
/** Children passed to component */ | ||
children: any, | ||
} | ||
|
||
/** | ||
* This is a basic table wrapper that uses Material-UI for the design. | ||
* It is used inside every panel on the gene summary page. | ||
*/ | ||
|
||
const TableWrapper = ({ classes, children }: Props) => ( | ||
<Paper className={classes.root}> | ||
<Table className={classes.table}> | ||
<TableBody>{children}</TableBody> | ||
</Table> | ||
</Paper> | ||
) | ||
|
||
export default withStyles(styles)(TableWrapper) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters