diff --git a/src/components/LastUpdatedCell/LastUpdatedCell.md b/src/components/LastUpdatedCell/LastUpdatedCell.md index e69de29..a0b202e 100644 --- a/src/components/LastUpdatedCell/LastUpdatedCell.md +++ b/src/components/LastUpdatedCell/LastUpdatedCell.md @@ -0,0 +1,36 @@ +The LastUpdatedCell wraps an [ItemTableCell](/#/Components/ItemTableCell) and changes its background color based on the time passed to it to indicate how old an item is. + +## Default Usage +```jsx +import { Paper } from '@material-ui/core'; +import LastUpdatedCell from "./LastUpdatedCell"; + +let today = new Date(); +let threeDaysAgo = new Date().setDate(today.getDate() - 3); +let lastWeek = new Date().setDate(today.getDate() - 8); +let lastMonth = new Date().setDate(today.getDate() - 28); + + + { /* Today */ } + + { /* Three Days Ago */ } + + { /* Last Week */ } + + { /* Last Month */ } + + +``` + +```jsx static + + { /* Today */ } + + { /* Three Days Ago */ } + + { /* Last Week */ } + + { /* Last Month */ } + + +``` \ No newline at end of file