-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from pusher/update-ui
update UI
- Loading branch information
Showing
13 changed files
with
320 additions
and
114 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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,109 @@ | ||
import arrow from "../../images/arrow-left.svg"; | ||
|
||
export default function Modal(props) { | ||
return ( | ||
<div style={{ display: "flex", flexDirection: "row", width: "100%" }}> | ||
<div style={{}}> | ||
<button | ||
style={{ | ||
color: "white", | ||
backgroundColor: "#7F7FA3", | ||
borderRadius: "4px", | ||
fontSize: "16px", | ||
lineHeight: "28px", | ||
fontWeight: 600, | ||
padding: "4px 16px", | ||
border: "none", | ||
cursor: "pointer", | ||
marginBottom: "12px", | ||
marginTop: "16px", | ||
}} | ||
onClick={() => props.setShowDetails(false)} | ||
> | ||
<img src={arrow} alt="" /> Back | ||
</button> | ||
<h3 | ||
style={{ | ||
position: "relative", | ||
fontWeight: 500, | ||
fontSize: "34px", | ||
lineHeight: "48px", | ||
fontFamily: "Maison Neue", | ||
color: "#300D4F", | ||
marginTop: "40px", | ||
marginBottom: "32px", | ||
paddingLeft: "16px", | ||
}} | ||
> | ||
<div | ||
style={{ | ||
position: "absolute", | ||
left: "0px", | ||
top: "0px", | ||
backgroundColor: props.col, | ||
height: "48px", | ||
width: "4px", | ||
}} | ||
/> | ||
{props.candidate} | ||
</h3> | ||
|
||
<table | ||
style={{ | ||
textAlign: "left", | ||
width: "727px", | ||
borderCollapse: "collapse", | ||
marginBottom: "24px", | ||
}} | ||
> | ||
<thead | ||
style={{ | ||
color: "#300D4F", | ||
fontSize: "20px", | ||
lineHeight: "34px", | ||
fontFamily: "Maison Neue", | ||
}} | ||
> | ||
<tr | ||
style={{ | ||
backgroundColor: "#F7F5FF", | ||
padding: "11px 16px", | ||
height: "56px", | ||
}} | ||
> | ||
<th | ||
style={{ paddingLeft: "16px", fontWeight: 500, width: "241px" }} | ||
> | ||
Region Name | ||
</th> | ||
<th style={{ fontWeight: 500, width: "250px" }}>Votes</th> | ||
<th style={{ fontWeight: 500 }}>Status</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{props.regions.map((region, i) => { | ||
return ( | ||
<tr | ||
style={{ | ||
backgroundColor: i % 2 === 0 ? "white" : "#F7F5FF", | ||
color: "#6A52FF", | ||
height: "40px", | ||
fontFamily: "Maison Neue", | ||
fontSize: "20px", | ||
lineHeight: "34px", | ||
}} | ||
> | ||
<td style={{ paddingLeft: "16px", fontWeight: 500 }}> | ||
{region[1]} | ||
</td> | ||
<td style={{ fontWeight: 500 }}>{region[props.index + 2]}</td> | ||
<td style={{ fontWeight: 500 }}>{region[10]}</td> | ||
</tr> | ||
); | ||
})} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,15 +1,51 @@ | ||
import sampleData from './allregions' | ||
import sampleData from "./allregions"; | ||
export default function Footer() { | ||
return ( | ||
<div> | ||
<main style={{display:"flex",flexDirection:"column", justifyContent:"space-around", bottom:0, left:"0%"}}> | ||
<h4 style={{color: "#300D4F" , width:"100%", fontFamily:"Maison Neue", fontWeight: 500, fontSize: "20px"}}>Available regions</h4> | ||
<div className="" style={{display:"flex", flexDirection:"row", }}> | ||
{sampleData.map((navigation)=>{ | ||
return <h4 style={{fontStyle:"normal",fontSize:"20px", fontWeight:"500", margin: "2px", fontFamily:"Maison Neue", color:"#8282AE"}}>{navigation},</h4> | ||
})} | ||
</div> | ||
<main | ||
style={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
justifyContent: "space-around", | ||
bottom: 0, | ||
left: "0%", | ||
marginBottom: "100px", | ||
}} | ||
> | ||
<h4 | ||
style={{ | ||
color: "#300D4F", | ||
width: "100%", | ||
fontFamily: "Maison Neue", | ||
fontWeight: 500, | ||
fontSize: "20px", | ||
lineHeight: "34px", | ||
margin: "0px", | ||
marginTop: "24px", | ||
}} | ||
> | ||
Available regions | ||
</h4> | ||
<div className="" style={{ display: "flex", flexDirection: "row" }}> | ||
{sampleData.map((navigation) => { | ||
return ( | ||
<h4 | ||
style={{ | ||
fontStyle: "normal", | ||
fontSize: "20px", | ||
lineHeight: "34px", | ||
fontWeight: "500", | ||
margin: "2px", | ||
fontFamily: "Maison Neue", | ||
color: "#8282AE", | ||
}} | ||
> | ||
{navigation}, | ||
</h4> | ||
); | ||
})} | ||
</div> | ||
</main> | ||
</div> | ||
) | ||
); | ||
} |
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 |
---|---|---|
@@ -1,10 +1,43 @@ | ||
import navigations from './navlinks' | ||
import logo from "../pusher_logo.png" | ||
export default function Nav() { | ||
return ( | ||
<main style={{display:"flex", flexDirection: "column", width:"540px"}}> | ||
<div style={{display:"flex", justifyContent:"center",paddingBottom:"0%", width:"106px", height:"28px", border:"none", borderRadius:"31px", backgroundColor: "#EBEAF4"}}><h4 style={{fontFamily:"Maison Neue", fontSize:"16px", color:"#300D4F",marginTop:"4px" }} >Polling app</h4></div> | ||
<span style={{display:"flex", flexDirection: "row", fontFamily:"Maison Neue", fontSize:"46px", color:"#300D4F", fontWeight:"500" }} >Pusher Tutorial</span> | ||
</main> | ||
) | ||
<main style={{ display: "flex", flexDirection: "column" }}> | ||
<div | ||
style={{ | ||
display: "flex", | ||
justifyContent: "center", | ||
paddingBottom: "0%", | ||
width: "106px", | ||
height: "28px", | ||
border: "none", | ||
borderRadius: "31px", | ||
backgroundColor: "#EBEAF4", | ||
}} | ||
> | ||
<h4 | ||
style={{ | ||
fontFamily: "Maison Neue", | ||
fontSize: "16px", | ||
fontWeight: "600", | ||
color: "#300D4F", | ||
marginTop: "4px", | ||
}} | ||
> | ||
Polling app | ||
</h4> | ||
</div> | ||
<span | ||
style={{ | ||
display: "flex", | ||
flexDirection: "row", | ||
fontFamily: "Maison Neue", | ||
fontSize: "46px", | ||
color: "#300D4F", | ||
fontWeight: "500", | ||
marginTop: "13px", | ||
}} | ||
> | ||
Pusher Tutorial | ||
</span> | ||
</main> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,24 +1,76 @@ | ||
import { useState } from "react" | ||
|
||
import Modal from "../modal/index" | ||
export default function State(props) { | ||
console.log(props) | ||
const [display, setDisplay] = useState('none') | ||
return ( | ||
<main style={{ }}> | ||
<div style={{display:"flex", flexDirection:"row", justifyContent: "space-between", height:"76px",backgroundColor:"#F2F1F9", marginBottom:"24px", borderRadius:"8px"}}> | ||
<main style={{}}> | ||
<div | ||
style={{ | ||
display: "flex", | ||
justifyContent: "space-between", | ||
alignItems: "center", | ||
backgroundColor: "#F7F5FF", | ||
marginBottom: "24px", | ||
padding: "9px 16px 8px 28px", | ||
}} | ||
> | ||
<div> | ||
<h4 style={{color: "#300D4F",fontFamily:"Maison Neue", fontWeight:500, fontSize:"20px", letterSpacing: "0.5px", marginTop:"-2px", marginBottom:"-4px",marginLeft:"16px"}}><span style={{color: props.color, fontSize:"30px", fontWeight:900}}>|</span> {props.name}</h4> | ||
<div> | ||
<p style={{marginLeft:"28px",fontFamily:"Maison Neue", color: "#300D4F", fontWeight:700}}>Total votes: {props.total.message[props.index + 6]} </p> | ||
</div> | ||
</div> | ||
<h4 | ||
style={{ | ||
color: "#300D4F", | ||
fontFamily: "Maison Neue", | ||
fontWeight: 500, | ||
fontSize: "20px", | ||
lineHeight: "34px", | ||
letterSpacing: "0.5px", | ||
margin: "0px", | ||
position: "relative", | ||
}} | ||
> | ||
<div | ||
style={{ | ||
position: "absolute", | ||
left: "-11px", | ||
top: "4px", | ||
backgroundColor: props.color, | ||
height: "24px", | ||
width: "4px", | ||
}} | ||
/> | ||
{props.name} | ||
</h4> | ||
<div> | ||
<p | ||
style={{ | ||
fontFamily: "Maison Neue", | ||
color: "#300D4F", | ||
fontWeight: 700, | ||
fontSize: "16px", | ||
lineHeight: "24px", | ||
margin: "0px", | ||
marginTop: "1px", | ||
}} | ||
> | ||
Total votes: {props.total.message[props.index + 6]}{" "} | ||
</p> | ||
</div> | ||
</div> | ||
<div> | ||
<button style={{marginRight: "20px", marginTop: "30px", color: "white", backgroundColor:"#7F7FA3", width:"71px", height: "36px", borderRadius:"4px"}} onClick={()=>setDisplay("")}>More</button> | ||
{/* <button>bid</button> */} | ||
</div> | ||
</div> | ||
<Modal index={props.index} display={display} regions={props.data} src={props.src} setDisplay={setDisplay} col={props.color} candidate={props.name} /> | ||
</main> | ||
) | ||
<button | ||
style={{ | ||
color: "white", | ||
backgroundColor: "#7F7FA3", | ||
borderRadius: "4px", | ||
fontSize: "16px", | ||
lineHeight: "28px", | ||
fontWeight: 600, | ||
padding: "4px 16px", | ||
border: "none", | ||
cursor: "pointer", | ||
}} | ||
onClick={() => props.setShowDetails(props.index)} | ||
> | ||
More | ||
</button> | ||
</div> | ||
</div> | ||
</main> | ||
); | ||
} |
Oops, something went wrong.