This repository has been archived by the owner on Jul 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
h2's the amount. and added a readme for storybook
- Loading branch information
1 parent
85ccd51
commit 98058be
Showing
2 changed files
with
58 additions
and
1 deletion.
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,57 @@ | ||
## Year To Date | ||
|
||
### Usage | ||
|
||
```js | ||
import YearToDate from "../../components/cards/cards.YearToDate"; | ||
|
||
<YearToDate | ||
amount={amount} | ||
graphData={graphData} | ||
linkUrl={linkUrl} | ||
/> | ||
``` | ||
|
||
### Properties | ||
|
||
* **amount** - the amount of the year to date contributions. | ||
* **graphData** - all of the data needed to show the graph. This includes: | ||
|
||
```js | ||
const graphData = { | ||
data: [ | ||
{ | ||
month: "January", | ||
amount: 300, | ||
tick: "J", | ||
}, | ||
{ | ||
month: "Febuary", | ||
amount: 275, | ||
tick: "F", | ||
}, | ||
... | ||
], | ||
lineColor: "#6BAC43", | ||
lineWidth: "3", | ||
dotColor: "#6BAC43", | ||
dotSize: "5", | ||
axisStyles: { | ||
axis: { | ||
lineColor: "transparent", | ||
lineWidth: "0", | ||
}, | ||
tickLabels: { | ||
fontSize: "20", | ||
padding: "8", | ||
fill: "#858585", | ||
}, | ||
}, | ||
}; | ||
``` | ||
|
||
* **linkUrl** - the url the link should go to. | ||
|
||
### Purpose | ||
|
||
This is currently designed to show the logged in user their year to date contributions. |
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