juanparadox / react-tachyons

A React.JS + Tachyons component library.
11 stars 0 forks source link

Add Tables components #40

Closed anater closed 7 years ago

anater commented 7 years ago

Should close #21

anater commented 7 years ago

The reason I used an array was so the the table could have a variable amount of columns. I decided not to use an object because there would have had have been some funky logic to determine columns.

On Mar 13, 2017, at 6:23 PM, Juan Bernal notifications@github.com wrote:

@juanparadox approved this pull request.

In src/components/tables/Striped.jsx:

  • {
  • data.map((arr, i) =>
  • {
  • arr.map((text, j) =>
  • {text}
  • )
  • }
  • )
  • }
  • +)
  • +Striped.defaultProps = {

  • columns: ['Name', 'Username', 'Email', 'ID'],
  • data: [
  • ['Hassan Johnson', '@hassan', 'hassan@companywithalongdomain.co', '14419232532474'], How come these aren't objects instead of arrays? Still approving the PR, but just wanted to know why.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.