diff --git a/src/Array.js b/src/Array.js index ab438812..c56e14a5 100644 --- a/src/Array.js +++ b/src/Array.js @@ -18,14 +18,21 @@ const styles = theme => ({ arrayItem: { position: "relative", padding: theme.spacing.unit, - marginBottom: theme.spacing.unit, + marginTop: theme.spacing.unit, display: "flex" }, deleteItemButton: { margin: [[-theme.spacing.unit, -theme.spacing.unit, "auto", "auto"]] }, addButton: { - marginTop: theme.spacing.unit + marginLeft: theme.spacing.unit + }, + elementsContainer: { + display: "flex", + flexWrap: "wrap" + }, + title: { + margin: "auto 0" } }); @@ -172,6 +179,24 @@ class Array extends Component { onChangeValidate(model); }; + getAddButton = () => { + const { form, classes } = this.props; + + const AddButton = + form.AddButton || + (props => ( + +
{arrays}
); } diff --git a/src/Text.js b/src/Text.js index bc7857ab..77eecd59 100755 --- a/src/Text.js +++ b/src/Text.js @@ -56,6 +56,7 @@ class Text extends React.Component { disabled={form.readonly} fullWidth required={form.required} + style={form.style} {...otherProps} /> ); diff --git a/src/index.js b/src/index.js index 675150ae..d2127409 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,4 @@ export { default as SchemaForm } from "./SchemaForm"; export { default as ComposedComponent } from "./ComposedComponent"; export { default as utils } from "./utils"; +export { default as Array } from "./Array";