Permalink
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (41 sloc) 695 Bytes

<Group>

Inserts separators between its children.

Usage

Import:

import {Group} from 'libreact/lib/Group';

Default separator is a space " ".

<Group>
  <span>Hello</span>
  <span>world</span>
</Group>

Result:

<div>
  <span>Hello</span> <span>world</span>
</div>

Use custom separator.

<Group separator={<hr />}>
  <span>Hello</span>
  <span>world</span>
</Group>

Use as prop to specify wrapper element tag name.

<Group as="span">
  <span>Hello</span>
  <span>world</span>
</Group>

Pass through any props to the wrapper element.

<Group className="foobar">
  <span>Hello</span>
  <span>world</span>
</Group>