Skip to content

Grid only takes a single child #10

Description

@abovethewater

I imagine this is a 'works as expected' issue, but currently I cannot declare a single Grid element containing multiple Rows.

This can be worked around easily enough by enclosing Rows in a div, but that's ugly.

Should I be able to?

The following error:

Warning: Failed prop type: Invalid prop `children` of type `array` supplied to `Grid`, expected a single ReactElement.
in Grid (created by App)
in App (created by TheApp)

results from the below code:

<Grid>
  <Row is='center'>
    <Cell is='1'>
      <div></div>
    </Cell>
  </Row>
  <Row is='center'>
    <Cell is='1'>
      <div></div>
    </Cell>
  </Row>
</Grid>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions