Skip to content

Commit

Permalink
fix: addd indent to array schema internals
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Aug 24, 2018
1 parent 39b930d commit 865f3ce
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/Schema/ArraySchema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ import * as React from 'react';
import { Schema, SchemaProps } from './Schema';

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> {
render() {
const itemsSchema = this.props.schema.items!;
return (
<div>
<ArrayOpenningLabel> Array </ArrayOpenningLabel>
<Schema {...this.props} schema={itemsSchema} />
<PaddedSchema>
<Schema {...this.props} schema={itemsSchema} />
</PaddedSchema>
<ArrayClosingLabel />
</div>
);
Expand Down

0 comments on commit 865f3ce

Please sign in to comment.