Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

feat(Grid): add props interface #133

Merged
mnajdova merged 6 commits intomasterfrom
feat/grid-prop-interface
Aug 27, 2018
Merged

feat(Grid): add props interface #133
mnajdova merged 6 commits intomasterfrom
feat/grid-prop-interface

Conversation

@mnajdova
Copy link
Contributor

This PR introduces props interface for the Grid component, as part of #117

@codecov
Copy link

codecov bot commented Aug 24, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@c18fbd7). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #133   +/-   ##
=========================================
  Coverage          ?   89.04%           
=========================================
  Files             ?       47           
  Lines             ?      776           
  Branches          ?      101           
=========================================
  Hits              ?      691           
  Misses            ?       83           
  Partials          ?        2
Impacted Files Coverage Δ
src/components/Grid/Grid.tsx 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c18fbd7...dba5b06. Read the comment docs.

return error
}

export type ItemShorthandType = React.ReactNode | object | (React.ReactNode | object)[]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not mix TypeScript typings and PropTypes. They both shared the name "type" but they are entirely different.

Propose we keep typings in /types.

variables: { height, width, defaultColumnCount, gridGap, padding },
}: {
props: IProps
props: IGridProps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think we should hold off on typing styles until we figure out how we're going to do that. Probably warrants a separate PR, some testing, and discussion.

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with change requests, see comments.

// Props
// ========================================================

export type ItemShorthand = React.ReactNode | object | (React.ReactNode | object)[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 we should put here Extendable as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will put it in the Button PR, as there I will finally have all components so that I can update them accordiongly. That is why I introduced just this type here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, thanks!

// Props
// ========================================================

export type ItemShorthand = React.ReactNode | object | (React.ReactNode | object)[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, thanks!

@mnajdova mnajdova merged commit bf797b7 into master Aug 27, 2018
@levithomason levithomason deleted the feat/grid-prop-interface branch October 29, 2019 22:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants