Add the title tag to the Array () definition within a schema block

This commit is contained in:
Chris Read 2020-10-30 12:15:03 +10:00
parent 6a97239f50
commit 4a2ac5136e

View File

@ -5,6 +5,7 @@ import { Schema, SchemaProps } from './Schema';
import { ArrayClosingLabel, ArrayOpenningLabel } from '../../common-elements'; import { ArrayClosingLabel, ArrayOpenningLabel } from '../../common-elements';
import styled from '../../styled-components'; import styled from '../../styled-components';
import {humanizeConstraints} from "../../utils"; import {humanizeConstraints} from "../../utils";
import { TypeTitle } from '../../common-elements/fields';
const PaddedSchema = styled.div` const PaddedSchema = styled.div`
padding-left: ${({ theme }) => theme.spacing.unit * 2}px; padding-left: ${({ theme }) => theme.spacing.unit * 2}px;
@ -23,6 +24,7 @@ export class ArraySchema extends React.PureComponent<SchemaProps> {
return ( return (
<div> <div>
<ArrayOpenningLabel> Array ({minMaxItems})</ArrayOpenningLabel> <ArrayOpenningLabel> Array ({minMaxItems})</ArrayOpenningLabel>
<TypeTitle>{itemsSchema.schema.title}</TypeTitle>
<PaddedSchema> <PaddedSchema>
<Schema {...this.props} schema={itemsSchema} /> <Schema {...this.props} schema={itemsSchema} />
</PaddedSchema> </PaddedSchema>