diff --git a/src/components/EmailHeader/EmailHeader.md b/src/components/EmailHeader/EmailHeader.md index e163f38..522c3dd 100644 --- a/src/components/EmailHeader/EmailHeader.md +++ b/src/components/EmailHeader/EmailHeader.md @@ -1,9 +1,64 @@ -Description of EmailHeader. +Displays an email header with name, email, time sent, and recipients if present. +--- + +Default usage, without props. ```jsx import EmailHeader from "./EmailHeader"; ``` ```jsx static +``` + +With `datetime`, `from_name` and `from_email` props. When `first_name` is passed, the [UserAvatar](/#/Components/UserAvatar) will display the first letter of the name. +```jsx +import EmailHeader from "./EmailHeader"; + +const demo_data = { + "datetime": "2020-05-11T13:44:12+0000", + "from_name": "Di Wang", + "from_email": "wang2039@purdue.edu", +}; + + + +``` +```jsx static + +``` + +You can add to/cc data by passing `to` and `cc` props. +```jsx +import EmailHeader from "./EmailHeader"; + +const demo_data = { + "datetime": "2020-05-11T13:44:12+0000", + "from_name": "Di Wang", + "from_email": "wang2039@purdue.edu", + "to": [ + { + "name": "'cesite@ecn.purdue.edu'", + "email": "cesite@ecn.purdue.edu" + } + ], + "cc": [ + { + "name": "Zavattieri, Pablo D", + "email": "zavattie@purdue.edu" + } + ] +}; + + + +``` +```jsx static + ``` \ No newline at end of file