Closed mihail-antonov closed 3 years ago
Hi @mihail-antonov,
Glad you like the component :)
The problem is that you're not passing the props down to the actual Menu component in your components/sidebar/Sidebar
file. It should be like this:
import React from 'react';
import { push as Menu } from 'react-burger-menu';
import './sidebar-style.css';
export default props => {
return (
<Menu {...props}> // <-------- pass props here
<a className="menu-item" href="/">
Home
</a>
<a className="menu-item" href="/salads">
Salads
</a>
<a className="menu-item" href="/pizzas">
Pizzas
</a>
<a className="menu-item" href="/desserts">
Desserts
</a>
</Menu>
);
};
Hello there. First of all superb sidebar component! I have a minor issue though. I've done everything that was shown in the guide and still couldn't get the [push] effect to work. Here is my code:
And the *.css files are as the demo. Thank you in advance!
Best regards, Mihail