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

Width Percentage #129

Open
gluaxspeed opened this issue Jan 30, 2020 · 0 comments
Open

Width Percentage #129

gluaxspeed opened this issue Jan 30, 2020 · 0 comments

Comments

@gluaxspeed
Copy link
Contributor

@gluaxspeed gluaxspeed commented Jan 30, 2020

Describe the bug
Having a View with a flex row layout and two children Views with different width: 'x%' fields doesn't render properly.

To Reproduce

import React from "react";
import {
  Renderer,
  Window,
  View,
} from "./index";

const App = () => {
  return (
    <Window styleSheet={containerStyle}>
      <View id="container">
            <View id="left"></View>
            <View id="right"></View>
          </View>
    </Window>
  );
};

const containerStyle = `
#container {
  flex: 1;
  flex-direction: row;
}

#left {
  background: red;
  flex: 1;
  width: '20%';
  height: '100%';
}

#right {
  background: green;
  flex: 1;
  width: '80%';
  height: '100%';
}
`;

Renderer.render(<App />);

Expected behavior
The Views should use the specified width percentages.

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • NodeGUI version: 0.13.1
  • React NodeGUI version: 0.4.0
  • OS Version: 4.19.94-1-lts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.