dashboard/src/App.js

39 lines
925 B
JavaScript
Raw Normal View History

import React from 'react';
2020-05-20 13:49:49 +02:00
import styled, { createGlobalStyle } from 'styled-components';
2020-05-20 13:49:49 +02:00
import SearchBar from './components/searchBar'
import Greeter from './components/greeter'
import AppList from './components/appList'
import BookmarkList from './components/bookmarkList'
import SettingsModal from './components/settingsModal'
import themeData from './components/data/themes.json';
const selectedTheme = localStorage.getItem("theme") ? JSON.parse(localStorage.getItem("theme")) : themeData.themes[0];
const GlobalStyle = createGlobalStyle`
body {
background-color: ${selectedTheme.backgroundColor};
}
`;
const AppContainer = styled.div`
max-width: 80%;
margin: auto;
padding: 10px;
`;
const App = () => (
<>
<GlobalStyle />
<AppContainer>
<SearchBar />
<SettingsModal />
<Greeter />
<AppList />
<BookmarkList />
</AppContainer>
</>
);
export default App;