mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-29 17:40:05 +03:00
feat(): Add styling
This commit is contained in:
parent
6222fe0e41
commit
9cc2e672e3
|
@ -5,17 +5,19 @@ import { observer } from 'mobx-react';
|
||||||
import { shortenHTTPVerb } from '../../utils';
|
import { shortenHTTPVerb } from '../../utils';
|
||||||
|
|
||||||
export interface ExtraOperationInformationProps {
|
export interface ExtraOperationInformationProps {
|
||||||
|
description: string;
|
||||||
httpVerb: string;
|
httpVerb: string;
|
||||||
label: string;
|
label: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ExtraOperationInformation = observer((props: ExtraOperationInformationProps) => {
|
export const ExtraOperationInformation = observer((props: ExtraOperationInformationProps) => {
|
||||||
const item = props;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div style={{ padding: '12.5px 0', margin: '0.5rem 0' }}>
|
||||||
<OperationBadge type={item.httpVerb}>{shortenHTTPVerb(item.httpVerb)}</OperationBadge>
|
<div>{props.description}</div>
|
||||||
<MenuItemTitle width="calc(100% - 38px)">{item.label}</MenuItemTitle>
|
<div style={{ display: 'flex' }}>
|
||||||
|
<OperationBadge type={props.httpVerb}>{shortenHTTPVerb(props.httpVerb)}</OperationBadge>
|
||||||
|
<MenuItemTitle width="calc(100% - 38px)">{props.label}</MenuItemTitle>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user