Releases: appfolio/react-gears
Add FileInput Component
This release adds the FileInput
component that makes dealing with file inputs simpler. This component is the default "file" input when using FormRow
. Also, due to the nature of file inputs, this is an uncontrolled component.
Example usage:
// as a plain input
<FileInput onChange={files => console.log(files)} /> // files is a FileList object
// or, in a FormRow
<FormRow type="file" />
Learn more about files and the Files API here.
Update LabelBadge classes
Minor fix to remove the LabelBadge use of .card class used to inherit border styling.
Add FilterList
This release adds the FilterList component.
Add LabelBadge component
v0.3.6 0.3.6
Update Progress
This release updates Progress bar component to default to an animated+striped appearance to match original Gears.
Update warning Alert
This updates the default icon for warning Alert to be a circled exclamation instead of bullhorn.
Tooltip Improvements
This release makes using Tooltips easier. Previously, a one-off wrapper needed to be written to manage the isOpen
state of the Tooltip. Now, the documentation corresponds to the implementation.
import { Tooltip } from 'react-gears';
...
<Tooltip placement="right" target="something">
Hello world!
</Tooltip>
BoundForm Improvements
This release improves the way BoundForm
passes its underlying object to child FormRows
. A new component, BoundFormRow
should be used within BoundForms
which reads the context provided by the form.
For example, the old way didn't allow:
<BoundForm object={...}>
<div>
<FormRow name="firstName" /> // Props aren't passed to non-immediate children
</div>
</BoundForm>
And the new way:
<BoundForm object={...}>
<div>
<BoundFormRow name="firstName" /> // Now it works-- by reading the context provided!
</div>
</BoundForm>
View the full diff here.
AddressInput and CurrencyInput
This release renames the Address
component to AddressInput
. Secondly, the CurrencyInput has new behavior in how it validates and masks currency input.
Address Input interface changes
This release includes a change to the serialization of the country information within an Address
. The country is now found under the key countryCode
as opposed to the old country
.
Addresses now follow:
{
address1: React.PropTypes.string,
address2: React.PropTypes.string,
city: React.PropTypes.string,
state: React.PropTypes.string,
postal: React.PropTypes.string,
countryCode: React.PropTypes.string
}