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

Add flex-support for Col component #169 #175

Merged
merged 4 commits into from
Oct 18, 2016
Merged

Add flex-support for Col component #169 #175

merged 4 commits into from
Oct 18, 2016

Conversation

ronnyhaase
Copy link
Contributor

Hi!

As requested in issue #169 I implemented support for dropping the size for the Col component, respectively flexbox support.

I added support for all suggestions by @eddywashere, meaning a value can be dropped at all, or set to "flex" and "auto", like:

<Col xs />
<Col xs="auto" />
<Col xs="flex" />

<Col
      xs={{ size: true, push: 2, pull: 2, offset: 2 }}
      sm={{ size: 'auto', push: 2, pull: 2, offset: 2 }}
      md={{ size: 'flex', push: 2, pull: 2, offset: 2 }}
/>

If the object's size shall accept boolean as well, and both "flex" and "auto" should be supported may needs some discussion?

Corresponding unit tests were added as well.

Looking forward to your feedback
Ronny

@eddywashere
Copy link
Member

@ronnyhaase nice work! I meant to finalize the options. After thinking about it, I don't think flex fits in as a descriptive value for the size attribute. Could you remove the flex value support and could you also update the docs? Everything else looks good. Thanks!!!

@ronnyhaase
Copy link
Contributor Author

I agree regarding flex. What's your opinion about accepting boolean for size in the configuration object @eddywashere? I don't like it as well.

Also allow me to ask if you prefer a rebase for removing flex or a separate commit.

I will make the changes and add documentation later on.

Thank you!

@eddywashere
Copy link
Member

Re: Boolean, I was originally cool with it. I'm a little hesitant to commit to it. Just doing the auto seems safer to maintain and is explicit.

Not super strict but I like to rebase. Either way I squash into a single commit when merging pr in github.

@ronnyhaase
Copy link
Contributor Author

ronnyhaase commented Oct 17, 2016

Hej! So I removed "flex" as valid option, and bool as valid type for size of config object.
Also I added two examples to the docs.

But unfortunately these examples are not working, since the docs use the Bootstrap release from NPM which has flex disabled by default.

How should I proceed from here? (I joined the Slack channel, feel free to ping me there)

@eddywashere
Copy link
Member

that's a really good question. react-helmet might support this. If not, we might need to hack in a separate html template for flexbox pages. If you need this out asap. I can merge it without the docs. let me know what you think.

@eddywashere eddywashere merged commit ebdecb8 into reactstrap:master Oct 18, 2016
@ronnyhaase ronnyhaase mentioned this pull request Oct 18, 2016
@GoPro16 GoPro16 mentioned this pull request Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants