Immanuel Onyeka преди 2 години
родител
ревизия
3f26ade468
променени са 5 файла, в които са добавени 81 реда и са изтрити 8 реда
  1. +1
    -0
      README.md
  2. +1
    -1
      src/Call.jsx
  3. +1
    -1
      src/Feed.jsx
  4. +4
    -0
      src/Navigator.jsx
  5. +74
    -6
      src/css/app.css

+ 1
- 0
README.md Целия файл

@@ -4,6 +4,7 @@
now the simplified method of managing state in react. now the simplified method of managing state in react.


### TODO ### TODO
- Show dates on calls?
- Add date seperators to calls - Add date seperators to calls
- Sort calls by descending dates - Sort calls by descending dates
- Add missed and voicemail icons to represent status - Add missed and voicemail icons to represent status


+ 1
- 1
src/Call.jsx Целия файл

@@ -56,7 +56,7 @@ function moveCall(call, update) {


function Call(props) { function Call(props) {
return ( return (
<div className="call">
<div className="fade-in call">


<ContactIcon/> <ContactIcon/>




+ 1
- 1
src/Feed.jsx Целия файл

@@ -76,7 +76,7 @@ function Feed(props) {
} }


return ( return (
<li key={entry.id}>
<li className={props.recent ? 'fade-in' : 'fade-in-right'} key={entry.id}>


<h4>{entry.direction == 'inbound' ? entry.from : entry.to} <h4>{entry.direction == 'inbound' ? entry.from : entry.to}
<PhoneSymbol inbound={entry.direction == 'inbound'}> <PhoneSymbol inbound={entry.direction == 'inbound'}>


+ 4
- 0
src/Navigator.jsx Целия файл

@@ -3,6 +3,7 @@ import React, {useState, useEffect} from 'react';
function Navigator(props) { function Navigator(props) {
let recent = "recent" + (props.recent ? " selected" : '') let recent = "recent" + (props.recent ? " selected" : '')
let archived = "archived" + (props.recent ? "" : " selected") let archived = "archived" + (props.recent ? "" : " selected")
let slider = "nav-slider" + (props.recent ? " left" : " right")
return ( return (
<nav> <nav>
<button onClick={() => props.onPageChange(true)} <button onClick={() => props.onPageChange(true)}
@@ -11,6 +12,9 @@ function Navigator(props) {
<button onClick={() => props.onPageChange(false)} <button onClick={() => props.onPageChange(false)}
className={archived}>Archived className={archived}>Archived
</button> </button>
<div>
<span className={slider}></span>
</div>
</nav> </nav>
) )
} }


+ 74
- 6
src/css/app.css Целия файл

@@ -1,3 +1,45 @@
@keyframes fade-in-translate {
from {
transform: translateX(-50px);
opacity: 0;
}

to {
transform: translateX(0);
opacity: 1;
}
}

@keyframes fade-in-translate-right {
from {
transform: translateX(50px);
opacity: 0;
}

to {
transform: translateX(0);
opacity: 1;
}
}

@keyframes fade-in {
from {
opacity: 0;
}

to {
opacity: 1;
}
}

.fade-in {
animation: fade-in-translate 0.3s 0.1s both;
}

.fade-in-right {
animation: fade-in-translate-right 0.3s 0.1s both;
}

#app { #app {
position: absolute; position: absolute;
display: flex; display: flex;
@@ -28,7 +70,7 @@
display: flex; display: flex;
flex-flow: wrap; flex-flow: wrap;
justify-content: center; justify-content: center;
gap: 40px;
/* gap: 40px; */
margin-top: 20px; margin-top: 20px;
} }


@@ -38,10 +80,6 @@
border: none; border: none;
} }


#app nav button.selected {
border-bottom: 2px solid green;
}

.calls h4 { .calls h4 {
margin-top: 0; margin-top: 0;
margin-bottom: 5px; margin-bottom: 5px;
@@ -50,10 +88,10 @@
list-style: none; list-style: none;
display: block; display: block;
position: relative; position: relative;
border: 2px solid lightgrey;
margin-bottom: 20px; margin-bottom: 20px;
padding: 10px; padding: 10px;
border-radius: 5px; border-radius: 5px;
box-shadow: 8px 14px 38px rgba(39,44,49,.1), 1px 3px 8px rgba(39,44,49,.06);
} }


.calls button { .calls button {
@@ -152,3 +190,33 @@
border-radius: 5px; border-radius: 5px;
background: white; background: white;
} }

nav div {
width: 100%;
height: 5px;
margin-top: 10px;
}

nav div span {
width: 25%;
height: 2px;
display: block;
background: green;
margin: auto;
}

nav div span.left {
transform: translateX(-70%);
}

nav div span.right {
transform: translateX(70%);
}

nav div span {
transition: 0.2s ease-in-out;
}

ul {
transition: all 0.2s ease-in;
}

Loading…
Отказ
Запис