Skip to content

Commit

Permalink
CC-21 - Set Global Styles (#27)
Browse files Browse the repository at this point in the history
* define style files structure

* additional comment in .env file

* typo
  • Loading branch information
skrzepij authored Nov 13, 2019
1 parent aa67e9e commit 2375906
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 9 deletions.
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 {

}
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';

0 comments on commit 2375906

Please sign in to comment.