Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

New API for Columns #48

Closed
AlgusDark opened this issue Jun 14, 2017 · 2 comments · Fixed by #55
Closed

New API for Columns #48

AlgusDark opened this issue Jun 14, 2017 · 2 comments · Fixed by #55
Assignees
Milestone

Comments

@AlgusDark
Copy link
Owner

Prop Description
isSize 1..12 - '3/4' - '2/3' - '1/2' - '1/3' - '1/4' - 'full' - 'narrow'
isMobile same as above
isTablet same as above
isDesktop same as above

That way we can remove props isFull, isNarrow, isThreeQuarters, isTwoThirds, isHalf, isOneThird, isOneQuarter.

The same should occur to Offset props, leaving only isOffset, isOffsetMobile, isOffsetTablet, isOffsetDesktop.

That would be a total of 12 props removed.

Important: Offset doesn't have full or narrow, but it has the other sizes.

@AlgusDark AlgusDark added the idea label Jun 14, 2017
@AlgusDark
Copy link
Owner Author

AlgusDark commented Jun 14, 2017

After that, we can leave it to only two props:

Prop type
isSize number - string - object
isOffset same as above

so users can do something like:

const size = {
  mobile: '1/2',
  tablet: 'full'
  desktop: 3,
}

const offset = {
  mobile: 3,
  desktop: 6
}

<Column isSize={size} isOffset={offset} > My Column </Column>

rendering:

<div
  class='is-half-mobile
    is-full-tablet
    is-3-desktop
    is-offset-3-mobile
    is-offset-6-desktop'>
  My Column
</div>

Leaving that to only two props to use.

Also, this way we can introduce widescreen modifier, since I forgot to include that (but is already in the code).

@AlgusDark AlgusDark self-assigned this Jun 14, 2017
@AlgusDark AlgusDark added this to the v1.0.0 milestone Jun 14, 2017
AlgusDark added a commit that referenced this issue Jun 16, 2017
@AlgusDark AlgusDark mentioned this issue Jun 20, 2017
AlgusDark added a commit that referenced this issue Jun 24, 2017
@shubhranshu
Copy link

What is the process for updating the website. Footer example still have a isFull prop being injected. There is a similar issues with Nav example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants