Skip to content

Instantly share code, notes, and snippets.

View hsrobflavorus's full-sized avatar

Robert Parker hsrobflavorus

View GitHub Profile
@hsrobflavorus
hsrobflavorus / react-toolbox.d.ts
Last active July 19, 2016 10:37 — forked from xogeny/react-toolbox.d.ts
12/21/2015: Fix "import * as Input from 'react-toolbox/lib/input'" style imports
// Type definitions for react-toolbox 0.14.0
// Project: http://react-toolbox.com/
// Definitions by: @xogeny (Michael M. Tiller), @hsrobflavorus (Robert Parker)
/* CHANGES
* 01/13/2016: Minor changes, add a few missing props, add IconButton to react-toolbox/lib/button
* 12/21/2015: Fix "import * as Input from 'react-toolbox/lib/input'" style imports, which now correctly import only the necessary component(s).
* NOTE that you must use "import * as {Component Name}" not just "import {Component Name}" for this to work.
* 12/20/2015: Should be compatible with 0.14.0. Refactor modules into 'react-toolbox/lib/*' format.
Unfortunately importing them directly in that manner doesn't seem to work
i.e. "import Input from 'react-toolbox/lib/input'" resolves to undefined, whereas "import { Input } from 'react-toolbox'" works fine!
{
items.map((line, index) => {
return (
<LineItemForm
key={index}
line={line}
onItemChange={this.props.itemChanged.bind(this, index)}
/>
);
})