-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format summaries to similar heights (#230)
- Loading branch information
1 parent
0890f86
commit 5866a0f
Showing
11 changed files
with
76 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
export const Legend = (props: React.PropsWithChildren) => ( | ||
<div className="border-0 rounded"> | ||
import _ from "lodash"; | ||
|
||
interface Props extends React.PropsWithChildren { | ||
className?: string; | ||
} | ||
|
||
export const Legend = (props: Props) => ( | ||
<div className={_.join(["border-0", "rounded", props.className], " ")}> | ||
{props.children} | ||
</div> | ||
); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
import Col from "react-bootstrap/Col"; | ||
import Row from "react-bootstrap/Row"; | ||
import { Serving } from "../../model/Food"; | ||
import { ServingCell } from "./ServingCell"; | ||
|
||
export const ServingSummary = (props: { serving: Serving; }) => ( | ||
<div className="d-flex justify-content-between flex-fill flex-wrap"> | ||
<ServingCell foodGroup="vegetable" amount={props.serving.vegetable} /> | ||
<ServingCell foodGroup="fruit" amount={props.serving.fruit} /> | ||
<ServingCell foodGroup="carbohydrate" amount={props.serving.carbohydrate} /> | ||
<ServingCell foodGroup="proteinDiary" amount={props.serving.proteinDiary} /> | ||
<ServingCell foodGroup="fat" amount={props.serving.fat} /> | ||
<ServingCell foodGroup="sweet" amount={props.serving.sweet} /> | ||
</div> | ||
<Row> | ||
<Col> | ||
<Row> | ||
<ServingCell foodGroup="vegetable" amount={props.serving.vegetable} /> | ||
</Row> | ||
<Row> | ||
<ServingCell foodGroup="proteinDiary" amount={props.serving.proteinDiary} /> | ||
</Row> | ||
</Col> | ||
<Col> | ||
<Row> | ||
<ServingCell foodGroup="fruit" amount={props.serving.fruit} /> | ||
</Row> | ||
<Row> | ||
<ServingCell foodGroup="fat" amount={props.serving.fat} /> | ||
</Row> | ||
</Col> | ||
<Col> | ||
<Row> | ||
<ServingCell foodGroup="carbohydrate" amount={props.serving.carbohydrate} /> | ||
</Row> | ||
<Row> | ||
<ServingCell foodGroup="sweet" amount={props.serving.sweet} /> | ||
</Row> | ||
</Col> | ||
</Row> | ||
) |
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