mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-29 17:40:05 +03:00
feat(): Add and move custom components to custom folder
This commit is contained in:
parent
1beb85d25d
commit
8d1dbf42f1
21
src/components/Custom/ExtraOperationInformation.tsx
Normal file
21
src/components/Custom/ExtraOperationInformation.tsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
import * as React from 'react';
|
||||
|
||||
import { MenuItemTitle, OperationBadge } from '../SideMenu';
|
||||
import { observer } from 'mobx-react';
|
||||
import { shortenHTTPVerb } from '../../utils';
|
||||
|
||||
export interface ExtraOperationInformationProps {
|
||||
httpVerb: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export const ExtraOperationInformation = observer((props: ExtraOperationInformationProps) => {
|
||||
const item = props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<OperationBadge type={item.httpVerb}>{shortenHTTPVerb(item.httpVerb)}</OperationBadge>
|
||||
<MenuItemTitle width="calc(100% - 38px)">{item.label}</MenuItemTitle>
|
||||
</div>
|
||||
);
|
||||
});
|
Loading…
Reference in New Issue
Block a user