Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Criando botão com relatorio de doaçoes #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Desktop.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[.ShellClassInfo]
IconFile=C:\Program Files\FolderPainter\Icons\Pack_01\12.ico
IconIndex=0
31,726 changes: 31,726 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"react-burger-menu": "^2.7.1",
"react-dom": "^16.13.1",
"react-icons": "^3.10.0",
"react-lottie": "^1.2.3",
"react-router-dom": "^5.2.0",
"react-router-hash-link": "^2.0.0",
"react-scripts": "3.4.1",
Expand Down
Binary file added public/Transparência-ÉPossívelSonhar.pdf
Binary file not shown.
48 changes: 48 additions & 0 deletions src/components/ButtonPdf/ButtonPDF.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from 'react';
import styled from 'styled-components';
import { Link } from 'react-router-dom';




const ButtonPDF = (props) => {

return (

<ContainerButton>
{ props.href ?
<A href={props.href} target="_blank" src="/src/images/Transparência-ÉPossívelSonhar.pdf">{props.title}</A> :
<StyledLink to={props.to}>{props.title}</StyledLink>
}
</ContainerButton>


)
}

export default ButtonPDF;

const A = styled.a`
color: #FFFFFF !important;
text-decoration: none !important;
`

const StyledLink = styled(Link)`
color: #FFFFFF !important;
text-decoration: none !important;
`

const ContainerButton = styled.button`
padding: 0.5em 1em;
margin-left:1em;
text-decoration: none;
background: #d33b3f;
color: #FFFFFF;
border: 0;
border-radius: 40px;
width: 112px;
height: 36px;
&:hover {
background: #ff0040;
}
`
11 changes: 11 additions & 0 deletions src/components/TopBar/TopBar.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
/* eslint-disable no-undef */
import React from "react";
import styled from "styled-components";
import TopButton from "../TopButton";
import Logo from "../Logo";
import Search from "../Search";
import { Link, useLocation } from "react-router-dom";
import ButtonPDF from'../ButtonPdf/ButtonPDF';
import { useEffect } from "react";

const TopBar = () => {
const { pathname } = useLocation();
const currentPath = pathname.substring(1);


return (
<Container>
Expand Down Expand Up @@ -44,7 +48,14 @@ const TopBar = () => {
/>

<TopButton title="Doe" to="/como-ajudar"></TopButton>

<ButtonPDF title="Doações" href="Transparência-ÉPossívelSonhar.pdf" > </ButtonPDF>




</Container>

);
};

Expand Down
3 changes: 3 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Attendance from "../Containers/Attendance";
import Publications from "../Containers/Publications";
import Radio from "../components/Radio";



export const Router = () => {
return (
<Switch>
Expand Down Expand Up @@ -35,6 +37,7 @@ export const Router = () => {
<Route exact path="/radio">
<Radio />
</Route>

</Switch>
);
};
Loading