Skip to content

Commit

Permalink
Merge pull request tokio-rs#337 from COVID19Tracking/state-page-table…
Browse files Browse the repository at this point in the history
…-styles-321

Fix padding on state page tables (closes tokio-rs#321)
  • Loading branch information
schwartzadev authored Apr 1, 2020
2 parents 02f300d + 604e831 commit 68aab8d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/common/table.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react'

const Table = ({ children }) => <table>{children}</table>
const Table = ({ children, className }) => (
<table className={className}>{children}</table>
)

export default Table
18 changes: 18 additions & 0 deletions src/scss/templates/state.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.state-historical {
th:last-child,
td:last-child {
padding-right: 0.25em;
}

ul {
color: green;
list-style: none;
display: inline list-item;
}

li {
display: inline;
padding: 0.8em;
padding-right: 0;
}
}
3 changes: 2 additions & 1 deletion src/templates/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import DetailText from '../components/common/detail-text'
import SummaryTable from '../components/common/summary-table'
import { SyncInfobox } from '../components/common/infobox'
import Table from '../components/common/table'
import '../scss/templates/state.scss'

const StateLinks = ({ name, twitter, covid19Site, dataSource }) => (
<UnstyledList>
Expand Down Expand Up @@ -62,7 +63,7 @@ const Screenshots = ({ date, screenshots }) => {
}

const StateHistory = ({ history, screenshots }) => (
<Table>
<Table className="state-historical">
<thead>
<tr>
<th scope="col">Date</th>
Expand Down

0 comments on commit 68aab8d

Please sign in to comment.