0
I want to make my page in darker tones, my folder structure is:
index.js
ReactDOM.render(
<Provider store={Store}>
<PersistGate loading={null} persistor={persistor}>
<App baseUrl={baseUrl} />
</PersistGate>
</Provider>,
document.getElementById('root'));
App.js
function App(props) {
return (
<div className="App">
<Root
isAuth={props.isAuth}
baseUrl={props.baseUrl}
/>
</div>
);
}
App.css
.App {
background-color: black; //Só para testar o funcionamento
text-align: center;
}
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type=number] {
-moz-appearance: textfield;
}
Root.js
class Root extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<Router basename={this.props.baseUrl}>
{
this.props.isAuth ?
<Navbar
logo={ logo }
background="#404040"
hoverBackground="#ddd"
linkColor="#777"
/>
: ''
}
<Switch>
{
this.props.isAuth ?
<React.Fragment>
<Route path="/Home" component={Home} />
<Route path="/Treinos" component={Treinos} />
<Route path="/Lives" component={Lives} />
<Route path="/Video_Aulas" component={VideoAulas} />
<Route path="/">
<Redirect to="/Home" />
</Route>
</React.Fragment>
:
<React.Fragment>
<Route path="/">
<Redirect to="/Login" />
</Route>
<Route path="/Login" component={Login} />
</React.Fragment>
}
</Switch>
</Router>
</div>
);
}
}
But the page looks like this, I’d like it to cover the whole page, not just that piece.
I tried to put the background-color
in the css of index.js
but nothing happened.
What should I do to change the entire background-color of the application??
Probably his
.App
simply does not occupy the full page. Puts a cssheight: 100vh
in his css– Rafael Tavares
Won’t evaluate the answers?
– novic