Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hungerbar.js #16

Open
Fweddi opened this issue May 31, 2019 · 2 comments
Open

Hungerbar.js #16

Fweddi opened this issue May 31, 2019 · 2 comments
Labels
question Further information is requested

Comments

@Fweddi
Copy link

Fweddi commented May 31, 2019

  return (
    <div className="bar">
      <div data-testid="hunger-bar" className="bar-level" style={{ width: props.hunger + "%" }} />
    </div>
  );
};

Your hungerbar decreases in width according to a dynamic state - amazing! We tried this on our project with the height of our timebar, and it, er, well you probably saw. It changed both the height and width. Do you know how you would fix our issue?

@Fweddi Fweddi added the question Further information is requested label May 31, 2019
@sylv1ah
Copy link
Contributor

sylv1ah commented May 31, 2019

It could be that you're using a svg where we used two nested divs and changed the width of the inner div according to our hunger state, I'm not too sure about about svgs but it could be that it has a set height and width and when you tried to only change the height it will also effect the width (so it looks like it scales, which I don't think you want?) Also question from me, how do you make svgs? I'm intrigued 🧐

@starsuit
Copy link
Contributor

It might be worth letting go of the svg in favour of a div inside div thingy - but I know that's hard to hear...
letgo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants