fix: addd indent to array schema internals

This commit is contained in:
Roman Hotsiy 2018-08-24 11:39:18 +03:00
parent 39b930d0ee
commit 865f3ced4b
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -3,6 +3,11 @@ import * as React from 'react';
import { Schema, SchemaProps } from './Schema'; import { Schema, SchemaProps } from './Schema';
import { ArrayClosingLabel, ArrayOpenningLabel } from '../../common-elements'; import { ArrayClosingLabel, ArrayOpenningLabel } from '../../common-elements';
import styled from '../../styled-components';
const PaddedSchema = styled.div`
padding-left: ${({ theme }) => theme.spacing.unit * 2}px;
`;
export class ArraySchema extends React.PureComponent<SchemaProps> { export class ArraySchema extends React.PureComponent<SchemaProps> {
render() { render() {
@ -10,7 +15,9 @@ export class ArraySchema extends React.PureComponent<SchemaProps> {
return ( return (
<div> <div>
<ArrayOpenningLabel> Array </ArrayOpenningLabel> <ArrayOpenningLabel> Array </ArrayOpenningLabel>
<Schema {...this.props} schema={itemsSchema} /> <PaddedSchema>
<Schema {...this.props} schema={itemsSchema} />
</PaddedSchema>
<ArrayClosingLabel /> <ArrayClosingLabel />
</div> </div>
); );