cyntler / hamburger-react

Animated hamburger menu icons for React.js weighs only 1.5 KB.
https://hamburger-react.netlify.app
MIT License
963 stars 36 forks source link

Can we change Bg color #39

Closed NadirBakhsh closed 3 years ago

NadirBakhsh commented 3 years ago

Hello, I have a question can we change backgraound color on by condition use this toggled stated

luukdv commented 3 years ago

Hey @NadirBakhsh,

Sure! You can do something like this:

<Hamburger color={toggled ? 'pink' : 'purple'} toggled={toggled} toggle={toggle} />
NadirBakhsh commented 3 years ago

No! Color props use for change line color I want to change background color.

luukdv commented 3 years ago

You can change the background color as follows:

<div style={{ background: toggled ? 'pink' : 'purple' }}>
  <Hamburger />
</div>
NadirBakhsh commented 3 years ago

Humburger has default backgroud color.

On Wed, Jul 7, 2021, 1:56 PM Luuk de Vlieger @.***> wrote:

You can change the background color as follows:

<div style={{ background: toggled ? 'pink' : 'purple' }}>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/luukdv/hamburger-react/issues/39#issuecomment-875422600, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK7WT6W42TD4LQRS77AM4I3TWQJEXANCNFSM476DI75A .

luukdv commented 3 years ago

What do you mean exactly? 🙂 It has a transparent background by default.