uwigem / uwigem.com

Repository for uwigem.com
0 stars 0 forks source link

Create SideBySideContent Component #2

Open kwokwilliam opened 5 years ago

kwokwilliam commented 5 years ago

The main component will be called SideBySideContent. It is located in components/SideBySideContent/SideBySideContent.js

This component will receive three props: leftChild, rightChild, and leftWidth.

leftChild and rightChild will always be a single React component. We can enforce this later on with proptypes.

leftWidth will be the width of the left child. The right child's width will fill up the rest up to 100%.

leftChild and rightChild can be interchanged instead with props.children[0] and props.children[1] if you would prefer to do it that way.

niteshchetry commented 5 years ago

I am having troubles resizing images to fit within the given width. Also, I am not sure if the parent components I used are correct.

kwokwilliam commented 5 years ago

Commented on parts of your commit (2ca12ed) I can try to integrate it into a test page and check out what the specific problem with Resizing is.

kwokwilliam commented 5 years ago

Great work so far, I made some changes in a recent commit. I will comment on them in the commit. https://github.com/uwigem/uwigem.com/commit/10c6a0fb9305091453d9857918c55e4421e29bc5

kwokwilliam commented 5 years ago

Next steps are to add comments detailing the class inputs and outputs, expectations etc as well as decide if you want to use flexbox classes instead (may be more performant in the end, I can clarify this if you would like to know why).