From aa9540c4e4d5cd290fd4978f4101851ba09f0bf1 Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Thu, 19 May 2022 17:56:39 -0300 Subject: [PATCH] add fix and feature --- src/components/mapCard/MapCard.tsx | 2 +- src/components/mapCard/MapCardView.ts | 19 ++++- src/components/sidebar/SidebarView.ts | 2 + src/pages/_app.tsx | 3 +- src/pages/pld/index.tsx | 118 ++++++++++++++------------ src/styles/layouts/news/NewsView.ts | 13 ++- src/styles/layouts/pld/PldView.ts | 16 ++++ 7 files changed, 108 insertions(+), 65 deletions(-) diff --git a/src/components/mapCard/MapCard.tsx b/src/components/mapCard/MapCard.tsx index 0d6dc9b..bb89515 100644 --- a/src/components/mapCard/MapCard.tsx +++ b/src/components/mapCard/MapCard.tsx @@ -13,7 +13,7 @@ export default function MapCard({ title, subtitle, statistic, imgSource }: MapCa const route = title==='R$/MWh'? '/consumption': `pld/${title.slice(0,2).toLocaleLowerCase()}-${title.slice(3,5).toLocaleLowerCase()}` return ( - +

{title}

diff --git a/src/components/mapCard/MapCardView.ts b/src/components/mapCard/MapCardView.ts index cf69fa9..65c311a 100644 --- a/src/components/mapCard/MapCardView.ts +++ b/src/components/mapCard/MapCardView.ts @@ -1,21 +1,33 @@ import styled from 'styled-components' -export const MapCardView = styled.figure` +interface MapCardViewInterface { + statistic?: any +} + +export const MapCardView = styled.figure` display: flex; - justify-content: center; + justify-content: flex; align-items: center; flex-direction: row; margin-right: 2px; + h4 { + margin-left: ${props => props.statistic? '0' : '10px'}; + } + span { + margin-left: ${props => props.statistic? '0' : '10px'}; + margin-bottom: ${props => props.statistic? '25px' : '0px'}; + margin-top: ${props => props.statistic? '0px' : '30px'}; + } + * { margin: 0; padding: 0; } span { - margin-bottom: 25px; } div { @@ -27,6 +39,7 @@ export const MapCardView = styled.figure` article { display: flex; + /* margin-left: 20px; */ } } diff --git a/src/components/sidebar/SidebarView.ts b/src/components/sidebar/SidebarView.ts index 841f894..1719457 100644 --- a/src/components/sidebar/SidebarView.ts +++ b/src/components/sidebar/SidebarView.ts @@ -83,6 +83,8 @@ export const SidebarView = styled.nav` width: 90%; height: 190px; + margin-bottom: 40px; + background: linear-gradient(155.54deg, #254F7F 15.63%, #9C9C9C 136.34%); border-radius: 26px; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 8a80a65..0ee2917 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -61,8 +61,7 @@ function MyApp({ Component, pageProps }: AppProps) { null } -