Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jrowny committed Mar 6, 2017
1 parent 7e75d63 commit 77d40b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ Install with `npm install react-absolute-grid`
];

// Pass your display component to create a new grid
const AbsoluteGrid = createAbsoluteGrid(YourDisplayComponent);
const AbsoluteGrid = createAbsoluteGrid(YourDisplayComponent, {someProp: 'my component needs this'});
React.render(<AbsoluteGrid items={sampleItems} />, document.getElementById('Container'));


Options (Properties)
------

`createAbsoluteGrid(DisplayComponent, displayProps)` : DisplayComponent is a react component. displayProps are properties you want passed down to the DisplayComponent such as handlers.

| Property | Default | Description |
|---|:---:|---|
| **items** | [] | The array of items in the grid |
Expand Down Expand Up @@ -81,3 +83,8 @@ Browser Compatibility
This component should work in all browsers that [support CSS3 3D Transforms](http://caniuse.com/#feat=transforms3d). If you need IE9 support you can modify it to use transform rather than transform3d. Pull requests welcome!

Drag and Drop only works on IE11+ due to lack of pointer events, although there is a workaround coming soon.

-----
Migrating from 2.x

Instead of passing `displayObject` to the AbsoluteGrid component, pass the component directly into the composer function, `createAbsoluteGrid` which returns an AbsoluteGrid component. That's it!

0 comments on commit 77d40b3

Please sign in to comment.