From 884765b06582045179e6cccf0c3fa671ca3e18ae Mon Sep 17 00:00:00 2001 From: Danilo Vieira Date: Tue, 6 Oct 2020 17:11:04 -0300 Subject: [PATCH] Estilizando Detalhe --- .../src/pages/Repository/index.tsx | 58 ++++++++- .../src/pages/Repository/styles.ts | 123 ++++++++++++++++++ 2 files changed, 179 insertions(+), 2 deletions(-) create mode 100644 nivel-03/01-primeiro-projeto-com-react/src/pages/Repository/styles.ts diff --git a/nivel-03/01-primeiro-projeto-com-react/src/pages/Repository/index.tsx b/nivel-03/01-primeiro-projeto-com-react/src/pages/Repository/index.tsx index e7a62c0..a52de0b 100644 --- a/nivel-03/01-primeiro-projeto-com-react/src/pages/Repository/index.tsx +++ b/nivel-03/01-primeiro-projeto-com-react/src/pages/Repository/index.tsx @@ -1,5 +1,10 @@ import React from 'react'; -import { useRouteMatch } from 'react-router-dom'; +import { useRouteMatch, Link } from 'react-router-dom'; +import { FiChevronLeft, FiChevronRight } from 'react-icons/fi'; + +import logoImg from '../../assets/logo.svg'; + +import { Header, RepositoryInfo, Issues } from './styles'; interface RepositoryParams { repository: string; @@ -7,7 +12,56 @@ interface RepositoryParams { const Dashboard: React.FC = () => { const { params } = useRouteMatch(); - return
Repository:{params.repository}
; + + return ( + <> +
+ GitHub Explorer + + + Voltar + +
+ + +
+ Rocketseat +
+ rocketseat/unform +

Descrição do repositório

+
+
+
    +
  • + 1808 + Stars +
  • +
  • + 48 + Forks +
  • +
  • + 67 + Issues abertas +
  • +
+
+ + + +
+ asdasdasd +

asdasdasd

+
+ + + +
+ + ); }; export default Dashboard; diff --git a/nivel-03/01-primeiro-projeto-com-react/src/pages/Repository/styles.ts b/nivel-03/01-primeiro-projeto-com-react/src/pages/Repository/styles.ts new file mode 100644 index 0000000..9e131a4 --- /dev/null +++ b/nivel-03/01-primeiro-projeto-com-react/src/pages/Repository/styles.ts @@ -0,0 +1,123 @@ +import styled from 'styled-components'; + +export const Header = styled.header` + display: flex; + align-items: center; + justify-content: space-between; + + a { + display: flex; + align-items: center; + text-decoration: none; + color: #a8a8b3; + transition: color 0.2s; + + &:hover { + color: #666; + } + + svg { + margin-right: 4px; + } + } +`; + +export const RepositoryInfo = styled.section` + margin-top: 80px; + + header { + display: flex; + align-items: center; + + img { + width: 120px; + height: 120px; + border-radius: 50%; + } + + div { + margin-left: 24px; + + strong { + font-size: 36px; + color: #3d3d4d; + } + + p { + font-size: 18px; + color: #737380; + margin-top: 4px; + } + } + } + + ul { + display: flex; + list-style: none; + margin-top: 40px; + + li { + & + li { + margin-left: 80px; + } + + strong { + display: block; + font-size: 36px; + color: #3d3d4d; + } + + span { + display: block; + margin-top: 4px; + color: #6c6c80; + } + } + } +`; + +export const Issues = styled.div` + margin-top: 80px; + + a { + background: #fff; + border-radius: 5px; + width: 100%; + padding: 24px; + display: block; + text-decoration: none; + + display: flex; + align-items: center; + transition: transform 0.2s; + + & + a { + margin-top: 16px; + } + + &:hover { + transform: translateX(10px); + } + + div { + margin: 0 16px; + flex: 1; + + strong { + font-size: 20px; + color: #3d3d4d; + } + + p { + font-size: 18px; + color: #a8a8b3; + margin-top: 4px; + } + } + + svg { + margin-left: auto; + color: #cbcbd6; + } + } +`;