diff --git a/Components/CalendlyMail/index.jsx b/Components/CalendlyMail/index.jsx new file mode 100644 index 0000000..52f6944 --- /dev/null +++ b/Components/CalendlyMail/index.jsx @@ -0,0 +1,83 @@ + +function CalendlyMail({backArrow, downloadButton, rubbishButton, rateStarButton, calendlypic ,backButton, toggleSelectMail}) { + return ( +
+ +
+
+

Use more than one calendar?

+
+
+
+
+
+

Calendly for teams

+ <no-reply@calendly.com> +
+
+

+ to me <linda@boolean.co.uk> +

+
+
+
+

17 March 2021, 09:33

+
+
+
    +
  • + reply button +
  • +
  • + star button +
  • +
  • + delete button +
  • +
+
+
+
+
+ Calendly for teams +
+
+
+ + +
+
+
+ ) + } + + export default CalendlyMail \ No newline at end of file diff --git a/Components/Email/index.jsx b/Components/Email/index.jsx new file mode 100644 index 0000000..fe4a6a0 --- /dev/null +++ b/Components/Email/index.jsx @@ -0,0 +1,29 @@ +function Email({index, email, toggleRead, toggleStar, toggleSelectMail}) { + return( +
  • +
    + toggleRead(email)} + /> +
    +
    + toggleStar(email)} + /> +
    +
    toggleSelectMail(email)}>{email.sender}
    +
    toggleSelectMail(email)}>{email.title}
    +
  • + ) +} + +export default Email \ No newline at end of file diff --git a/Components/Emails/index.jsx b/Components/Emails/index.jsx new file mode 100644 index 0000000..d5ecc72 --- /dev/null +++ b/Components/Emails/index.jsx @@ -0,0 +1,18 @@ +import Email from "../Email" + + +function Emails({filteredEmails, toggleRead, toggleStar, toggleSelectMail}) { + return ( +
    + +
    + ) +} + +export default Emails \ No newline at end of file diff --git a/Components/FirstMail/index.jsx b/Components/FirstMail/index.jsx new file mode 100644 index 0000000..f379751 --- /dev/null +++ b/Components/FirstMail/index.jsx @@ -0,0 +1,86 @@ + + + + +function FirstMail({backArrow, downloadButton, rubbishButton, rateStarButton, zoomImage,backButton, toggleSelectMail}) { + return ( +
    + +
    +
    +

    Cloud Recording - Nicolas Marcoras Personal Meeting Room is available

    +
    +
    +
    +
    +
    +

    Zoom

    + <no-reply@zoom.com> +
    +
    +

    + to me <linda@boolean.co.uk> +

    +
    +
    +
    +

    17 March 2021, 09:33

    +
    +
    +
      +
    • + reply button +
    • +
    • + star button +
    • +
    • + delete button +
    • +
    +
    +
    +
    +
    + Zoom logo +
    +
    +
    + + +
    +
    +
    + ) + } + + export default FirstMail \ No newline at end of file diff --git a/Components/Header/index.jsx b/Components/Header/index.jsx new file mode 100644 index 0000000..5828bf0 --- /dev/null +++ b/Components/Header/index.jsx @@ -0,0 +1,24 @@ +function Header() { + return( + <> +
    +
    + + + + + gmail logo +
    + +
    + +
    +
    + + ) +} + +export default Header \ No newline at end of file diff --git a/Components/Left-Menu/index.jsx b/Components/Left-Menu/index.jsx new file mode 100644 index 0000000..9d3bd8c --- /dev/null +++ b/Components/Left-Menu/index.jsx @@ -0,0 +1,34 @@ +function LeftMenu({currentTab, setCurrentTab, setHideRead, unreadEmails, starredEmails, hideRead}) { + return ( + + ) +} + +export default LeftMenu \ No newline at end of file diff --git a/Components/NotionMail/index.jsx b/Components/NotionMail/index.jsx new file mode 100644 index 0000000..1bf2594 --- /dev/null +++ b/Components/NotionMail/index.jsx @@ -0,0 +1,83 @@ + +function NotionMail({backArrow, downloadButton, rubbishButton, rateStarButton, booleanImage ,backButton, toggleSelectMail}) { + return ( +
    + +
    +
    +

    You received an update in Boolean

    +
    +
    +
    +
    +
    +

    Zoom

    + <no-reply@boolean.co.uk> +
    +
    +

    + to me <linda@boolean.co.uk> +

    +
    +
    +
    +

    17 March 2021, 09:33

    +
    +
    +
      +
    • + reply button +
    • +
    • + star button +
    • +
    • + delete button +
    • +
    +
    +
    +
    +
    + Boolean logo +
    +
    +
    + + +
    +
    +
    + ) + } + + export default NotionMail \ No newline at end of file diff --git a/Components/PatrickMail/index.jsx b/Components/PatrickMail/index.jsx new file mode 100644 index 0000000..6cf0139 --- /dev/null +++ b/Components/PatrickMail/index.jsx @@ -0,0 +1,83 @@ + +function PatrickMail({backArrow, downloadButton, rubbishButton, rateStarButton, patrickpic ,backButton, toggleSelectMail}) { + return ( +
    + +
    +
    +

    Updated invitation: Coding chat with Nico

    +
    +
    +
    +
    +
    +

    Coding chat with Nico

    + <patrick@patrick.com> +
    +
    +

    + to me <linda@boolean.co.uk> +

    +
    +
    +
    +

    17 March 2021, 09:33

    +
    +
    +
      +
    • + reply button +
    • +
    • + star button +
    • +
    • + delete button +
    • +
    +
    +
    +
    +
    + Calendly for teams +
    +
    +
    + + +
    +
    +
    + ) + } + + export default PatrickMail \ No newline at end of file diff --git a/Components/SecondMail/index.jsx b/Components/SecondMail/index.jsx new file mode 100644 index 0000000..49f6401 --- /dev/null +++ b/Components/SecondMail/index.jsx @@ -0,0 +1,86 @@ + + + + +function SecondMail({backArrow, downloadButton, rubbishButton, rateStarButton, zoomImage,backButton, toggleSelectMail}) { + return ( +
    + +
    +
    +

    Sean Davison has joined your personal Meeting Room

    +
    +
    +
    +
    +
    +

    Zoom

    + <no-reply@zoom.com> +
    +
    +

    + to me <linda@boolean.co.uk> +

    +
    +
    +
    +

    18 February 2021, 10:33

    +
    +
    +
      +
    • + reply button +
    • +
    • + star button +
    • +
    • + delete button +
    • +
    +
    +
    +
    +
    + Zoom logo +
    +
    +
    + + +
    +
    +
    + ) + } + + export default SecondMail \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index c902699..e025004 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,6 +3,23 @@ import { useState } from 'react' import initialEmails from './data/emails' import './styles/App.css' +import Header from '../Components/Header' +import LeftMenu from '../Components/Left-Menu' +import Emails from '../Components/Emails' +import FirstMail from '../Components/FirstMail' +import SecondMail from '../Components/SecondMail' +import NotionMail from '../Components/NotionMail' +import CalendlyMail from '../Components/CalendlyMail' +import PatrickMail from '../Components/PatrickMail' + +import zoomImage from './assets/images/zoom-logo-png.webp' +import backArrow from './assets/icons/back-arrow.png' +import downloadButton from './assets/icons/download-button.png' +import rateStarButton from './assets/icons/rate-star-button.png' +import rubbishButton from './assets/icons/rubbish-bin-delete-button.png' +import backButton from './assets/icons/back-button.webp' +import booleanImage from './assets/images/boolean.png' +import calendlypic from './assets/images/Teams.png' const getReadEmails = emails => emails.filter(email => !email.read) @@ -12,6 +29,9 @@ function App() { const [emails, setEmails] = useState(initialEmails) const [hideRead, setHideRead] = useState(false) const [currentTab, setCurrentTab] = useState('inbox') + const [selectedEmail, setSelectedEmail] = useState(null) + + const unreadEmails = emails.filter(email => !email.read) const starredEmails = emails.filter(email => email.starred) @@ -34,6 +54,10 @@ function App() { setEmails(updatedEmails) } + const toggleSelectMail = targetEmail => { + setSelectedEmail(targetEmail) + } + let filteredEmails = emails if (hideRead) filteredEmails = getReadEmails(filteredEmails) @@ -43,80 +67,70 @@ function App() { return (
    -
    -
    - - - - - gmail logo -
    - -
    - -
    -
    - -
    - -
    + +
    + + + {selectedEmail === null ? ( + + ) : selectedEmail.id === 1 ? ( + + ) : selectedEmail.id === 2 ?( + + ) : selectedEmail.id === 3 ? ( + + ) : selectedEmail.id === 4 ? ( + + ) : ( + + )}
    + ) } diff --git a/src/assets/icons/back-arrow.png b/src/assets/icons/back-arrow.png new file mode 100644 index 0000000..77bf292 Binary files /dev/null and b/src/assets/icons/back-arrow.png differ diff --git a/src/assets/icons/back-button.webp b/src/assets/icons/back-button.webp new file mode 100644 index 0000000..21b6deb Binary files /dev/null and b/src/assets/icons/back-button.webp differ diff --git a/src/assets/icons/download-button.png b/src/assets/icons/download-button.png new file mode 100644 index 0000000..ddb5a11 Binary files /dev/null and b/src/assets/icons/download-button.png differ diff --git a/src/assets/icons/rate-star-button.png b/src/assets/icons/rate-star-button.png new file mode 100644 index 0000000..16d6722 Binary files /dev/null and b/src/assets/icons/rate-star-button.png differ diff --git a/src/assets/icons/rubbish-bin-delete-button.png b/src/assets/icons/rubbish-bin-delete-button.png new file mode 100644 index 0000000..7090fb1 Binary files /dev/null and b/src/assets/icons/rubbish-bin-delete-button.png differ diff --git a/src/assets/images/Teams.png b/src/assets/images/Teams.png new file mode 100644 index 0000000..687aacc Binary files /dev/null and b/src/assets/images/Teams.png differ diff --git a/src/assets/images/boolean.png b/src/assets/images/boolean.png new file mode 100644 index 0000000..7697fe3 Binary files /dev/null and b/src/assets/images/boolean.png differ diff --git a/src/assets/images/flaticon-welcome-image.png b/src/assets/images/flaticon-welcome-image.png new file mode 100644 index 0000000..698c431 Binary files /dev/null and b/src/assets/images/flaticon-welcome-image.png differ diff --git a/src/assets/images/zoom-logo-png.webp b/src/assets/images/zoom-logo-png.webp new file mode 100644 index 0000000..c7a8659 Binary files /dev/null and b/src/assets/images/zoom-logo-png.webp differ diff --git a/src/styles/App.css b/src/styles/App.css index da375b1..743d3d1 100644 --- a/src/styles/App.css +++ b/src/styles/App.css @@ -144,3 +144,125 @@ .email .star-checkbox:checked::before { background-image: url(https://www.gstatic.com/images/icons/material/system/2x/star_googyellow500_20dp.png); } + + +.email-toolbar { + padding: 0.5rem 2rem; + + display: grid; + grid-template-columns: auto 1fr auto; + + border-bottom: 1px solid #eee; +} + +.email-toolbar > * { + display: grid; + grid-auto-flow: column; + align-items: center; + gap: 1rem; +} + +.email-toolbar > ul { + list-style-type: none; +} + +.email-toolbar .icon { + width: 24px; + height: 24px; +} + +.email-toolbar button { + padding: 0.25rem 0.5rem 0.4rem; + + border-radius: 0.5rem; + border: 1px solid #a1a1a1; + background-color: transparent; + + font-weight: bold; +} + +.title { + padding: 1rem; +} + +.title h1 { + padding-left: 56px; + + font-weight: normal; +} + +.email-content--header { + padding: 0.5rem 1rem; + + display: grid; + grid-template-columns: auto 1fr auto auto; + gap: 1rem; +} + +.email-content--header .avatar { + width: 56px; + height: 56px; + + border-radius: 100%; + background-color: #eee; +} + +.email-info { + padding: 0.25rem 0; +} + +.email-info .sender-info h2 { + margin-right: 1rem; + + display: inline-block; + + font-size: 0.925rem; +} + +.email-info .user-info { + margin-top: 0.5rem; +} + +.email-info .user-info p { + font-size: 0.825rem; +} + +.email-action-icons ul { + padding: 0; + margin: 0; + + display: grid; + grid-auto-flow: column; + gap: 0.25rem; + + list-style-type: none; +} + +.email-action-icons .icon { + width: 20px; + height: 20px; +} + +.email-body .content { + max-width: 600px; + margin: 0 auto; +} + +.email-body .content img { + width: 100%; +} + +.email-actions { + padding: 1rem 0.5rem; +} + +.email-actions button { + padding: 0.5rem 1rem; + margin-right: 0.5rem; + + border-radius: 0.5rem; + border: 1px solid #a1a1a1; + background-color: transparent; + + font-weight: bold; +}