-
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.
- Loading branch information
Showing
27 changed files
with
977 additions
and
255 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import * as React from "react"; | ||
import { CssStyleSheet } from "./cssStyleSheet"; | ||
|
||
interface ButtonProps { | ||
onClick?: () => void; | ||
style?: React.CSSProperties; | ||
children?: React.ReactNode ; | ||
} | ||
export const Button = (props: ButtonProps) => ( | ||
<button style={{...styles.button, ...props.style}} {...props}>{props.children}</button> | ||
); | ||
|
||
const styles: CssStyleSheet = { | ||
button: { | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
fontSize: 18, | ||
padding: "10px 20px", | ||
background: "white", | ||
borderRadius: "10px", | ||
borderColor: "#f0f0f0", | ||
cursor: "pointer" | ||
} | ||
}; |
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,3 @@ | ||
export interface CssStyleSheet { | ||
[key: string]: React.CSSProperties; | ||
} |
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,33 @@ | ||
import * as React from "react"; | ||
import { CssStyleSheet } from "./cssStyleSheet"; | ||
|
||
interface StatisticProps { | ||
title: string; | ||
value: string | number; | ||
color?: string; | ||
style?: React.CSSProperties; | ||
} | ||
export const Statistic = (props: StatisticProps) => ( | ||
<div style={{...styles.statistic, ...props.style}}> | ||
<div style={{...styles.value, color: props.color}}> | ||
{props.value} | ||
</div> | ||
<div style={styles.title}> | ||
{props.title} | ||
</div> | ||
</div> | ||
); | ||
|
||
const styles: CssStyleSheet = { | ||
statistic: { | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center" | ||
}, | ||
value: { | ||
fontSize: 28 | ||
}, | ||
title: { | ||
fontSize: 18 | ||
} | ||
}; |
Oops, something went wrong.