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

CC-21 - Set Global Styles #27

Merged
merged 4 commits into from
Nov 13, 2019
Merged
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
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SASS_PATH=./node_modules;./src

# For Windows users:
# SASS_PATH=node+modules:src
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
content="CConverter - Open Source Currency converter created by Mad-Rat"
/>
<link rel="apple-touch-icon" href="logo192.png" />
<!--
Expand All @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>CConverter - Currency converter</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
13 changes: 13 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react'
import {Dashboard} from './components/Dashboard'
import './App.scss'

const App = () => {
return (
<div>
<Dashboard />
</div>
)
}

export default App
Empty file added src/App.scss
Empty file.
1 change: 0 additions & 1 deletion src/components/Dashboard.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Button, Input} from "antd"
import 'antd/dist/antd.css'
import './Dashboard.scss'
import React, {useEffect, useState} from "react"
import {getCurrencyValues} from "../services/CurrencyService"
Expand Down
13 changes: 7 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as serviceWorker from './serviceWorker';
import {Dashboard} from "./components/Dashboard";
import React from 'react'
import ReactDOM from 'react-dom'
import * as serviceWorker from './serviceWorker'
import './styles/styles.scss'
import App from './App'

ReactDOM.render(<Dashboard />, document.getElementById('root'));
ReactDOM.render(<App/>, document.getElementById('root'))

serviceWorker.unregister();
serviceWorker.unregister()
11 changes: 11 additions & 0 deletions src/styles/base/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import "../utils/variables";

html {
font-size: 14px;
}

body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 1rem;
}
3 changes: 3 additions & 0 deletions src/styles/base/_headers.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
h1, h2, h3, h4, h5 {
skrzepij marked this conversation as resolved.
Show resolved Hide resolved

}
6 changes: 6 additions & 0 deletions src/styles/base/_links.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
a {
color: inherit;
&:hover, &:focus, &:active {
color: inherit;
}
}
7 changes: 7 additions & 0 deletions src/styles/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Vendors
@import 'vendors/antd';

// Base
@import "base/base";
@import "base/headers";
@import "base/links";
3 changes: 3 additions & 0 deletions src/styles/utils/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Colors
$white: #fff;
$black: #000;
1 change: 1 addition & 0 deletions src/styles/vendors/_antd.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '~antd/dist/antd.css';