fix: add some spacing between operation description and parameters

This commit is contained in:
Roman Hotsiy 2018-08-07 11:35:12 +03:00
parent 9e69eedea0
commit 597688e720
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -16,6 +16,7 @@ import { ResponsesList } from '../Responses/ResponsesList';
import { ResponseSamples } from '../ResponseSamples/ResponseSamples';
import { OperationModel as OperationType } from '../../services/models';
import styled from '../../styled-components';
const OperationRow = Row.extend`
backface-visibility: hidden;
@ -34,6 +35,10 @@ const OperationRow = Row.extend`
}
`;
const Description = styled(Markdown)`
margin-bottom: ${({ theme }) => theme.spacing.unit * 8};
`;
export interface OperationProps {
operation: OperationType;
}
@ -54,7 +59,7 @@ export class Operation extends React.Component<OperationProps> {
{summary} {deprecated && <Badge type="warning"> Deprecated </Badge>}
</H2>
{options.pathInMiddlePanel && <Endpoint operation={operation} inverted={true} />}
{description !== undefined && <Markdown source={description} />}
{description !== undefined && <Description source={description} />}
<SecurityRequirements securities={operation.security} />
<Parameters parameters={operation.parameters} body={operation.requestBody} />
<ResponsesList responses={operation.responses} />