Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created January 6, 2020 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BetterProgramming/0940e94ca03c544fecc3fa304f4870ae to your computer and use it in GitHub Desktop.
Save BetterProgramming/0940e94ca03c544fecc3fa304f4870ae to your computer and use it in GitHub Desktop.
import React from "react";
export default function Total({ title, value }) {
return (
<div style={styles.row}>
<h4 style={styles.title}>{title}:</h4>
<h4 style={styles.value}>{value}</h4>
</div>
);
}
const styles = {
row: {
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
maxWidth: 350,
margin: "10px auto",
},
title: {
fontWeight: 600,
margin: 0,
},
value: {
color: "#f7931a",
fontSize: 24,
margin: 0,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment