├── .gitignore
├── README.md
├── package.json
├── public
└── index.html
├── src
├── App.tsx
├── assets
│ └── images
│ │ ├── Inter-orange.png
│ │ └── background-login.jpg
├── components
│ ├── Button
│ │ ├── index.tsx
│ │ └── styles.ts
│ ├── Card
│ │ ├── index.tsx
│ │ └── styles.ts
│ ├── Header
│ │ ├── index.tsx
│ │ └── styles.ts
│ ├── Input
│ │ ├── index.tsx
│ │ └── styles.ts
│ └── UserCircle
│ │ ├── index.tsx
│ │ └── styles.ts
├── index.tsx
├── pages
│ ├── Dashboard
│ │ ├── Statement
│ │ │ ├── index.tsx
│ │ │ └── styles.ts
│ │ ├── index.tsx
│ │ └── styles.ts
│ ├── SignIn
│ │ ├── index.tsx
│ │ └── styles.ts
│ └── SignUp
│ │ ├── index.tsx
│ │ └── styles.ts
├── react-app-env.d.ts
├── routes
│ └── index.tsx
└── styles
│ ├── colors.ts
│ ├── globalStyles.ts
│ ├── styled.d.ts
│ └── theme
│ └── index.ts
├── tsconfig.json
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `yarn start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13 |
14 | The page will reload if you make edits.\
15 | You will also see any lint errors in the console.
16 |
17 | ### `yarn test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `yarn build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `yarn eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35 |
36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37 |
38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39 |
40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "front",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.11.4",
7 | "@testing-library/react": "^11.1.0",
8 | "@testing-library/user-event": "^12.1.10",
9 | "@types/jest": "^26.0.15",
10 | "@types/node": "^12.0.0",
11 | "@types/react": "^17.0.0",
12 | "@types/react-dom": "^17.0.0",
13 | "@types/react-router-dom": "^5.3.2",
14 | "date-fns": "^2.27.0",
15 | "react": "^17.0.2",
16 | "react-dom": "^17.0.2",
17 | "react-icons": "^4.3.1",
18 | "react-router-dom": "^6.0.2",
19 | "react-scripts": "4.0.3",
20 | "styled-components": "^5.3.3",
21 | "typescript": "^4.1.2",
22 | "web-vitals": "^1.0.1"
23 | },
24 | "scripts": {
25 | "start": "react-scripts start",
26 | "build": "react-scripts build",
27 | "test": "react-scripts test",
28 | "eject": "react-scripts eject"
29 | },
30 | "eslintConfig": {
31 | "extends": [
32 | "react-app",
33 | "react-app/jest"
34 | ]
35 | },
36 | "browserslist": {
37 | "production": [
38 | ">0.2%",
39 | "not dead",
40 | "not op_mini all"
41 | ],
42 | "development": [
43 | "last 1 chrome version",
44 | "last 1 firefox version",
45 | "last 1 safari version"
46 | ]
47 | },
48 | "devDependencies": {
49 | "@types/styled-components": "^5.1.15"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Inter
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/App.tsx:
--------------------------------------------------------------------------------
1 | import { ThemeProvider } from 'styled-components';
2 |
3 | import Router from './routes';
4 | import {theme} from './styles/theme'
5 | import GlobalStyle from './styles/globalStyles'
6 |
7 | function App() {
8 | return (
9 |
10 |
11 |
12 |
13 | );
14 | }
15 |
16 | export default App;
17 |
--------------------------------------------------------------------------------
/src/assets/images/Inter-orange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pablohdev/dio-inter-clone-frontend/5fbb950555c37aaa55e0d400e916bf1740477329/src/assets/images/Inter-orange.png
--------------------------------------------------------------------------------
/src/assets/images/background-login.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pablohdev/dio-inter-clone-frontend/5fbb950555c37aaa55e0d400e916bf1740477329/src/assets/images/background-login.jpg
--------------------------------------------------------------------------------
/src/components/Button/index.tsx:
--------------------------------------------------------------------------------
1 | import { ButtonHTMLAttributes } from 'react';
2 | import {ButtonContainer} from './styles';
3 |
4 |
5 | const Button = (props: ButtonHTMLAttributes) => {
6 | return (
7 |
8 | {props.children}
9 |
10 | )
11 | }
12 |
13 | export default Button;
--------------------------------------------------------------------------------
/src/components/Button/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 |
4 | export const ButtonContainer = styled.button`
5 | width: 100%;
6 | height: 46px;
7 |
8 |
9 | color: ${({theme}) => theme.colors.background};
10 | background: ${({theme}) => theme.colors.primary};
11 | border: 1px solid ${({theme}) => theme.colors.primary};
12 | border-radius: 10px;
13 |
14 | margin-bottom: 20px;
15 |
16 | display:flex;
17 | justify-content: center;
18 | align-items: center;
19 |
20 | z-index: 5000;
21 |
22 | &:hover {
23 | filter: opacity(0.8)
24 | }
25 |
26 | &:disabled {
27 | filter: opacity(0.4)
28 | }
29 |
30 |
31 | `
--------------------------------------------------------------------------------
/src/components/Card/index.tsx:
--------------------------------------------------------------------------------
1 | import {CardContainer} from './styles';
2 |
3 |
4 | interface CardProps {
5 | width?: string,
6 | children?: React.ReactNode;
7 | height?: string,
8 | noShadow?: boolean
9 | }
10 |
11 | const Card = ({
12 | children,
13 | width='100%',
14 | height='auto',
15 | noShadow = false,
16 | }: CardProps) => {
17 | return (
18 |
19 | {children}
20 |
21 | )
22 | }
23 |
24 | export default Card;
25 |
--------------------------------------------------------------------------------
/src/components/Card/styles.ts:
--------------------------------------------------------------------------------
1 | import styled, {css} from 'styled-components';
2 |
3 |
4 | export const CardContainer = styled.div<{
5 | width: string;
6 | height: string;
7 | noShadow: boolean;
8 | }>`
9 | width: ${(props) => props.width};
10 | height: ${(props) => props.height};
11 |
12 | background: ${({theme}) => theme.colors.background};
13 |
14 | ${props => !props.noShadow && css`
15 | box-shadow: 5px 4px 6px rgba(0, 0, 0, 0.25);
16 | `}
17 | border-radius: 20px;
18 |
19 | padding: 20px;
20 |
21 | display:flex;
22 | align-items: center;
23 | flex-direction: column;
24 |
25 | z-index: 5000;
26 | `
--------------------------------------------------------------------------------
/src/components/Header/index.tsx:
--------------------------------------------------------------------------------
1 | import {HeaderContainer, HeaderWrapper, UserInfo} from './styles';
2 | import UserCircle from '../UserCircle';
3 |
4 | import logoInter from '../../assets/images/Inter-orange.png';
5 | import { useNavigate } from 'react-router-dom';
6 |
7 |
8 | const Header = () => {
9 |
10 | const navigate = useNavigate();
11 |
12 | const handleLogoff = () => {
13 | navigate('/signin')
14 | }
15 | return (
16 |
17 |
18 |
19 |
20 |
21 |
22 |
Olá, Pablo
23 |
22001123-1
24 |
Sair
25 |
26 |
27 |
28 |
29 | )
30 | }
31 |
32 | export default Header
--------------------------------------------------------------------------------
/src/components/Header/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 |
4 | export const HeaderContainer = styled.head`
5 | width: 100%;
6 | height: 90px;
7 |
8 | background-color: ${({theme}) => theme.colors.background};
9 |
10 | display: flex;
11 | align-items: center;
12 | justify-content: center;
13 | `
14 |
15 | export const HeaderWrapper = styled.div`
16 | width: 80%;
17 | height: 90px;
18 |
19 | display: flex;
20 | align-items: center;
21 | justify-content: space-between;
22 | `
23 |
24 | export const UserInfo = styled.div`
25 | display: flex;
26 | justify-content: center;
27 | align-items: center;
28 | `
--------------------------------------------------------------------------------
/src/components/Input/index.tsx:
--------------------------------------------------------------------------------
1 | import { InputHTMLAttributes } from 'react';
2 | import {InputContainer} from './styles';
3 |
4 |
5 | const Input = (props: InputHTMLAttributes) => {
6 | return (
7 |
8 |
9 |
10 | )
11 | }
12 |
13 | export default Input;
--------------------------------------------------------------------------------
/src/components/Input/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 |
4 | export const InputContainer = styled.div`
5 | width: 100%;
6 | height: 46px;
7 |
8 |
9 | background: ${({theme}) => theme.colors.background};
10 | border: 1px solid ${({theme}) => theme.colors.primary};
11 | border-radius: 10px;
12 |
13 | margin-bottom: 20px;
14 |
15 | display:flex;
16 | justify-content: center;
17 |
18 | z-index: 5000;
19 |
20 | input {
21 | font-size: 0.75rem;
22 | font-weight: 400;
23 | background: transparent;
24 | border: 0;
25 | width: 100%;
26 | margin: 0 20px
27 | }
28 | `
--------------------------------------------------------------------------------
/src/components/UserCircle/index.tsx:
--------------------------------------------------------------------------------
1 | import {CircleContainer} from './styles';
2 |
3 |
4 | interface UserInfo {
5 | initials: string;
6 | }
7 |
8 | const UserCircle = ({initials}: UserInfo) => {
9 | return (
10 |
11 | {initials}
12 |
13 | )
14 | }
15 |
16 | export default UserCircle
--------------------------------------------------------------------------------
/src/components/UserCircle/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 | export const CircleContainer = styled.div`
4 | width: 74px;
5 | height: 74px;
6 | border-radius: 50%;
7 | border: 1px solid ${({theme}) => theme.colors.primary};
8 |
9 | display: flex;
10 | align-items:center;
11 | justify-content: center;
12 |
13 | margin-right: 20px;
14 |
15 | color: ${({theme}) => theme.colors.primary};
16 | font-weight: 300;
17 | font-size: 2rem;
18 |
19 | `
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
--------------------------------------------------------------------------------
/src/pages/Dashboard/Statement/index.tsx:
--------------------------------------------------------------------------------
1 | import {StatementItemContainer, StatementItemImage, StatementItemInfo, StatementContainer} from './styles';
2 | import {FiDollarSign} from 'react-icons/fi'
3 | import {format} from 'date-fns';
4 |
5 | interface StatementItem {
6 | user: {
7 | firstName: string,
8 | lastName: string
9 | },
10 | value: number,
11 | type: 'pay' | 'received',
12 | updatedAt: Date
13 | }
14 |
15 | const StatementItem = ({user, value, type, updatedAt}: StatementItem) => {
16 | return (
17 |
18 |
19 |
20 |
21 |
22 |
23 | {value.toLocaleString('pt-br',{style: 'currency', currency: 'BRL'})}
24 |
25 | {type === 'pay' ? `Pago a `: `Recebido de`} {user.firstName} {user.lastName}
26 | {format(updatedAt, "dd/MM/yyyy 'às' HH:mm'h'")}
27 |
28 |
29 | )
30 | }
31 |
32 | const Statement = () => {
33 |
34 | const statements: StatementItem[] = [
35 | {
36 | user:{
37 | firstName: 'Pablo',
38 | lastName: 'Henrique'
39 | },
40 | value: 250.00,
41 | type: 'pay',
42 | updatedAt: new Date()
43 | },
44 | {
45 | user:{
46 | firstName: 'José',
47 | lastName: 'Santos'
48 | },
49 | value: 270.00,
50 | type: 'received',
51 | updatedAt: new Date()
52 | }
53 | ]
54 | return (
55 |
56 | {statements.map(statement => )}
57 |
58 | )
59 | }
60 |
61 | export default Statement;
--------------------------------------------------------------------------------
/src/pages/Dashboard/Statement/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 | export const StatementContainer = styled.div`
4 | width: 100%;
5 | margin-top: 20px;
6 | display: flex;
7 | flex-direction: column ;
8 | justify-content: flex-start ;
9 | align-items: flex-start;
10 | `
11 |
12 | export const StatementItemContainer = styled.div`
13 | display: flex;
14 | width: 100%;
15 | `
16 |
17 | export const StatementItemInfo = styled.div`
18 |
19 | p{
20 | margin-bottom: 2px;
21 | }
22 | `
23 |
24 |
25 | export const StatementItemImage = styled.div<{
26 | type: 'pay' | 'received'
27 | }>`
28 | width: 60px;
29 | height: 60px;
30 | margin-right: 20px;
31 | display: flex;
32 | justify-content: center;
33 | align-items: center;
34 | color: ${({theme}) => theme.colors.background};
35 | border-radius: 10px;
36 | margin-bottom: 20px;
37 |
38 | background-color: ${({type, theme}) => type === 'pay' ? theme.colors.red : theme.colors.green };
39 | `;
40 |
41 |
--------------------------------------------------------------------------------
/src/pages/Dashboard/index.tsx:
--------------------------------------------------------------------------------
1 | import {DashboardBackground, BodyContainer, InlineContainer, InlineTitle} from './styles';
2 |
3 | import Header from '../../components/Header';
4 | import Card from '../../components/Card';
5 | import Input from '../../components/Input';
6 | import Button from '../../components/Button';
7 |
8 | import Statement from './Statement';
9 |
10 | const Dashboard = () => {
11 |
12 | const wallet = 1000.00
13 |
14 | return (
15 |
16 |
17 |
18 |
19 |
20 |
21 | Saldo Atual
22 |
23 |
24 |
25 | {wallet.toLocaleString('pt-br',{style: 'currency', currency: 'BRL'})}
26 |
27 |
28 |
29 |
30 |
31 | Receber PIX
32 |
33 |
34 |
35 |
36 |
37 |
38 | Pix copia e cola:
39 | asd10asd1asd1as4d1asd4
40 |
41 |
42 |
43 |
44 | Pagar PIX
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | Extrato da conta
56 |
57 |
58 |
59 |
60 |
61 |
62 | )
63 | }
64 |
65 | export default Dashboard
--------------------------------------------------------------------------------
/src/pages/Dashboard/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 | export const DashboardBackground = styled.main`
4 | width: 100%;
5 | height: 100vh;
6 |
7 | display:flex;
8 | align-items: center;
9 | flex-direction: column;
10 |
11 | background-color: ${({theme}) => theme.colors.backgroundLight};
12 | `
13 |
14 | export const BodyContainer = styled.main`
15 | width: 80%;
16 | margin-top: 40px;
17 |
18 | display: flex;
19 | justify-content: space-between;
20 |
21 | > div {
22 | flex: 1;
23 |
24 | & > div {
25 | margin-bottom: 20px;
26 | }
27 |
28 | &:nth-child(2){
29 | display: flex;
30 | justify-content: flex-end;
31 | }
32 | }
33 | `
34 |
35 | export const InlineTitle = styled.div`
36 | display: flex;
37 | width: 100%;
38 |
39 | `
40 |
41 | export const InlineContainer = styled.div`
42 | display: flex;
43 | margin-top: 20px;
44 | width: 100%;
45 |
46 | div{
47 | flex: 4;
48 | margin-right: 20px
49 | }
50 |
51 | button{
52 | flex: 1;
53 | }
54 | `
55 |
--------------------------------------------------------------------------------
/src/pages/SignIn/index.tsx:
--------------------------------------------------------------------------------
1 | import {Wrapper, Background, InputContainer, ButtonContainer} from './styles';
2 | import { useNavigate, Link } from 'react-router-dom';
3 |
4 | import background from '../../assets/images/background-login.jpg';
5 | import logoInter from '../../assets/images/Inter-orange.png';
6 |
7 | import Card from '../../components/Card';
8 | import Input from '../../components/Input';
9 | import Button from '../../components/Button';
10 |
11 | const SignIn = () => {
12 | const navigate = useNavigate();
13 |
14 | const handleToSingIn = () => {
15 | navigate('/dashboard')
16 | }
17 | return (
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | Ainda não tem cadastro? Cadastre-se Já
31 |
32 |
33 |
34 | )
35 | }
36 |
37 | export default SignIn;
38 |
--------------------------------------------------------------------------------
/src/pages/SignIn/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 | export const Wrapper = styled.main`
4 | width: 100%;
5 | height: 100vh;
6 |
7 | position: relative;
8 |
9 | display: flex;
10 | align-items: center;
11 | justify-content: center;
12 | `
13 |
14 | export const Background = styled.div<{image: any}>`
15 | position: absolute;
16 | width: 100%;
17 | top: 0;
18 | left: 0;
19 | height: 50vh;
20 | background-image: url(${(props => props.image)});
21 | background-size: contain;
22 | z-index: 1;
23 | `
24 |
25 | export const InputContainer = styled.div`
26 | margin-top: 67px;
27 | width: 90%;
28 | flex: 1;
29 | `
30 |
31 | export const ButtonContainer = styled.div`
32 | width: 90%;
33 |
34 | margin-top: 20px;
35 | display: flex;
36 | align-items: center;
37 | flex-direction: column;
38 |
39 | p{
40 | font-size: 0.75rem;
41 | font-weight: 400;
42 | color: ${({theme})=> theme.colors.secondary};
43 |
44 | a {
45 | font-size: 1rem;
46 | font-weight: 700;
47 | }
48 |
49 | }
50 | `
--------------------------------------------------------------------------------
/src/pages/SignUp/index.tsx:
--------------------------------------------------------------------------------
1 | import {Wrapper, Background, InputContainer, ButtonContainer} from './styles';
2 | import { useNavigate, Link } from 'react-router-dom';
3 |
4 | import background from '../../assets/images/background-login.jpg';
5 | import logoInter from '../../assets/images/Inter-orange.png';
6 |
7 | import Card from '../../components/Card';
8 | import Input from '../../components/Input';
9 | import Button from '../../components/Button';
10 |
11 | const SignUp = () => {
12 | const navigate = useNavigate();
13 |
14 | const handleToSingIn = () => {
15 | navigate('/dashboard')
16 | }
17 | return (
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Já tem uma conta? Entre Já
34 |
35 |
36 |
37 | )
38 | }
39 |
40 | export default SignUp;
41 |
--------------------------------------------------------------------------------
/src/pages/SignUp/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 | export const Wrapper = styled.main`
4 | width: 100%;
5 | height: 100vh;
6 |
7 | position: relative;
8 |
9 | display: flex;
10 | align-items: center;
11 | justify-content: center;
12 | `
13 |
14 | export const Background = styled.div<{image: any}>`
15 | position: absolute;
16 | width: 100%;
17 | top: 0;
18 | left: 0;
19 | height: 50vh;
20 | background-image: url(${(props => props.image)});
21 | background-size: contain;
22 | z-index: 1;
23 | `
24 |
25 | export const InputContainer = styled.div`
26 | margin-top: 67px;
27 | width: 90%;
28 | flex: 1;
29 | `
30 |
31 | export const ButtonContainer = styled.div`
32 | width: 90%;
33 |
34 | margin-top: 20px;
35 | display: flex;
36 | align-items: center;
37 | flex-direction: column;
38 |
39 | p{
40 | font-size: 0.75rem;
41 | font-weight: 400;
42 | color: ${({theme})=> theme.colors.secondary};
43 |
44 | a {
45 | font-size: 1rem;
46 | font-weight: 700;
47 | }
48 |
49 | }
50 | `
--------------------------------------------------------------------------------
/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/src/routes/index.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | BrowserRouter,
3 | Routes,
4 | Route,
5 | } from "react-router-dom";
6 | import SignIn from '../pages/SignIn';
7 | import SignUp from '../pages/SignUp';
8 | import Dashboard from '../pages/Dashboard';
9 |
10 | export const Router = ()=>{
11 | return(
12 |
13 |
14 | }/>
15 | }/>
16 | }/>
17 | }/>
18 |
19 |
20 | )
21 | }
22 |
23 | export default Router
24 |
--------------------------------------------------------------------------------
/src/styles/colors.ts:
--------------------------------------------------------------------------------
1 | export const colors = {
2 | PRIMARY: "#FB6910",
3 | SECONDARY: "#343233",
4 | TERTIARY: "#E8E8E8",
5 | BACKGROUND: "#FFFFFF",
6 | BACKGROUND2: "#F6F6F7",
7 | RED: "#E72424",
8 | GREEN: "#15b138"
9 | }
--------------------------------------------------------------------------------
/src/styles/globalStyles.ts:
--------------------------------------------------------------------------------
1 | import { createGlobalStyle } from 'styled-components'
2 |
3 | const GlobalStyle = createGlobalStyle`
4 | * {
5 | padding: 0;
6 | margin: 0;
7 | font-family: 'Roboto', sans-serif;
8 | font-size: 16px;
9 | }
10 |
11 | body {
12 | background-color: ${({theme}) => theme.colors.background};
13 | }
14 |
15 | input, button, textarea, select {
16 | font-family: 'Roboto', sans-serif;
17 | }
18 |
19 | input:focus, textarea:focus, select:focus{
20 | outline: none;
21 | }
22 |
23 | a {
24 | text-decoration: none;
25 | color: ${({theme})=> theme.colors.primary};
26 |
27 | &:hover {
28 | filter: opacity(0.8)
29 | }
30 | }
31 |
32 | .primary-color{
33 | color: ${({theme})=> theme.colors.primary};
34 | }
35 |
36 |
37 | .font-bold{
38 | font-weight: 700;
39 | }
40 |
41 | .h2{
42 | font-weight: 500;
43 | font-size: 1.5rem;
44 | line-height: 28px;
45 | color: #000000;
46 | }
47 |
48 | .wallet{
49 | font-weight: 500;
50 | color: ${({theme})=> theme.colors.primary};
51 | font-size: 2.5rem; //40px
52 | line-height: 47px;
53 | }
54 | `
55 |
56 | export default GlobalStyle
--------------------------------------------------------------------------------
/src/styles/styled.d.ts:
--------------------------------------------------------------------------------
1 | // import original module declarations
2 | import 'styled-components';
3 |
4 | // and extend them!
5 | declare module 'styled-components' {
6 | export interface DefaultTheme {
7 | colors: {
8 | primary: string,
9 | secondary: string,
10 | tertiary: string,
11 | background: string,
12 | backgroundLight: string,
13 | red: string,
14 | green: string
15 | };
16 | }
17 | }
--------------------------------------------------------------------------------
/src/styles/theme/index.ts:
--------------------------------------------------------------------------------
1 | import {colors} from '../colors';
2 |
3 | export const theme = {
4 | colors: {
5 | primary: colors.PRIMARY,
6 | secondary: colors.SECONDARY,
7 | tertiary: colors.TERTIARY,
8 | background: colors.BACKGROUND,
9 | backgroundLight: colors.BACKGROUND2,
10 | red: colors.RED,
11 | green: colors.GREEN
12 | }
13 | }
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------