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

Split: allow to invert (visually) the two slots #611

Merged
merged 2 commits into from Oct 7, 2019

Conversation

@bpierre
Copy link
Member

commented Oct 4, 2019

Usage:

<Split
  invert="horizontal"
  primary={
    <div>
      On large viewports, this will get displayed
      on the right side rather than the left.
    </div>
  }
  secondary={
    <div>
      On large viewports, this will get displayed
        on the left side rather than the right.
    </div>
  }
/>

Note: “left” and “right” will mean the opposite when right to left support will be added to aragonUI.

<Split
  invert="vertical"
  primary={
    <div>
      On small viewports, this will get displayed second.
    </div>
  }
  secondary={
    <div>
      On small viewports, this will get displayed first.
    </div>
  }
/>

/cc @onbjerg @deamme

bpierre added 2 commits Oct 4, 2019
@bpierre bpierre requested a review from sohkai Oct 4, 2019
@bpierre bpierre merged commit ba0df0d into newstyle Oct 7, 2019
5 checks passed
5 checks passed
License Compliance All checks passed.
Details
WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@delete-merged-branch delete-merged-branch bot deleted the split-invert branch Oct 7, 2019
</div>
</Inside>
)
}

Split.propTypes = {
invert: PropTypes.oneOf(['none', 'horizontal', 'vertical']),

This comment has been minimized.

Copy link
@sohkai

sohkai Oct 9, 2019

Member

Quick question, more so for @onbjerg and @deamme, would a 'both' setting be useful?

If you've inverted the horizontal split, such that the right side is the primary element, wouldn't you also want that element to show first in the vertical mode?

This comment has been minimized.

Copy link
@bpierre

bpierre Oct 9, 2019

Author Member

Yes, we were just discussing it yesterday with @deamme, we need to add both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.