Hello i want to build a toolbar that has an image in the background. I have build two different components. The first is the image component:
import React from 'react';
import thepic from '../mypic.jpg'; // with import
import '../App.css';
const Image = () => {
return (
<img src={thepic} className='the-pic' />
)
}
export default Image;
The second component is the toolbar, i am using react-bootstrap toolbar and i wrap the previous component in the toolbar:
<Image>
<Navbar>
<Container>
<Navbar.Brand href="#home">
React-Bootstrap
</Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="me-auto">
<Nav.Link href="#home">
Home
</Nav.Link>
<Nav.Link href="#link">
Link
</Nav.Link>
</Nav>
</Navbar.Collapse>
</Container>
</Navbar>
</Image>
I have manage to display the image in the screen but the toolbar is not shown up. It's like the image override the toolbar.
Can anyone help with this ?