Skip to content

Commit

Permalink
StatusBar added
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdlm committed Oct 13, 2021
1 parent d224903 commit 59637ce
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from "styled-components";
import db from "../../../db.json";
import { motion } from "framer-motion";
import { useRouter } from "next/router";
import StatsBar from "../StatsBar";

const Main = styled.div`
justify-content: space-between;
Expand Down Expand Up @@ -176,6 +177,7 @@ export function MainComplete() {
/>
</Main.MiniCard>
</Main.BlockMiniCard>
<StatsBar />
</Main.PlayerArea>
<Main.Ranking
as={motion.div}
Expand Down
75 changes: 75 additions & 0 deletions src/components/StatsBar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import React from "react";
import styled from "styled-components";
import db from "../../../db.json";
const Container = styled.div`
display: flex;
flex-wrap: wrap;
width: 100%;
height: 20%;
justify-content: space-around;
align-items: center;
`;

const Bar = styled.div`
position: relative;
width: 40%;
height: 10%;
border-radius: 50px;
background-color: #4c596d;
`;

const Desc = styled.label`
position: absolute;
top: -260%;
`;

export default function StatsBar() {
return (
<Container>
<Bar>
<div
style={{
backgroundColor: `${db.theme.colors.red}`,
height: "100%",
borderRadius: "50px",
width: "70%",
}}
/>
<Desc>Força</Desc>
</Bar>
<Bar>
<div
style={{
backgroundColor: `${db.theme.colors.blue}`,
height: "100%",
borderRadius: "50px",
width: "25%",
}}
/>
<Desc>Magia</Desc>
</Bar>
<Bar>
<div
style={{
backgroundColor: `${db.theme.colors.yellow}`,
height: "100%",
borderRadius: "50px",
width: "50%",
}}
/>
<Desc>Percepção</Desc>
</Bar>
<Bar>
<div
style={{
backgroundColor: `${db.theme.colors.green}`,
height: "100%",
borderRadius: "50px",
width: "78%",
}}
/>
<Desc>Agilidade</Desc>
</Bar>
</Container>
);
}

0 comments on commit 59637ce

Please sign in to comment.