Skip to content

Commit

Permalink
Connect theme to the provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ludmilka-k committed Nov 2, 2023
1 parent cd98e33 commit a94804b
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/constants/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './theme';
10 changes: 10 additions & 0 deletions src/constants/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

export const theme= {
colors: {
primaryTextColor: '#212121',
secondaryTextColor: '#757575',
mainBGColor: '#F7F6F9',
mainAccentColor: '#3E85F3',
mainAccentColorActive: '#2B78EF',
}
};
58 changes: 54 additions & 4 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@import-normalize; /* bring in normalize.css styles */
@import 'modern-normalize/modern-normalize.css';
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
padding: 0;
font-family: "Poppins", sans-serif;
font-weight: 400;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
Expand All @@ -13,3 +15,51 @@ code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

*, *::before, *::after {
box-sizing: border-box;
}

html, body {
font-family: 'Inter Tight', sans-serif;
padding: 0;
margin: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
margin: 0;
}

p {
margin: 0;
}

ul, ol {
margin: 0;
padding: 0;
list-style: none;
}

a {
color: inherit;
text-decoration: none;
outline: none;
}

button {
border: none;
margin: 0;
padding: 0;
background-color: transparent;
cursor: pointer;
}

img {
display: block;
width: 100%;
height: auto;
}


11 changes: 9 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { App } from 'components/App';
import { BrowserRouter } from 'react-router-dom';
import { ThemeProvider } from '@emotion/react';
import App from './components/App';
import { theme } from './constants/';
import './index.css';

ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
<ThemeProvider theme={theme}>
<BrowserRouter basename='/rent-n-roll'>
<App />
</BrowserRouter>
</ThemeProvider>
</React.StrictMode>
);

0 comments on commit a94804b

Please sign in to comment.