fix: add label API docs by Redocly (#2099)

This commit is contained in:
Anastasiia Derymarko 2022-07-27 11:27:12 +03:00 committed by GitHub
parent a5804db1ce
commit dcdab83890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 9 deletions

View File

@ -27,7 +27,8 @@ export class SideMenu extends React.Component<{ menu: MenuStore; className?: str
<MenuItems items={store.items} onActivate={this.activate} root={true} /> <MenuItems items={store.items} onActivate={this.activate} root={true} />
<RedocAttribution> <RedocAttribution>
<a target="_blank" rel="noopener noreferrer" href="https://redocly.com/redoc/"> <a target="_blank" rel="noopener noreferrer" href="https://redocly.com/redoc/">
Documentation Powered by Redocly <img src={'https://cdn.redoc.ly/redoc/logo-mini.svg'} alt={'redocly logo'} /> API docs
by Redocly
</a> </a>
</RedocAttribution> </RedocAttribution>
</PerfectScrollbarWrap> </PerfectScrollbarWrap>

View File

@ -2,7 +2,7 @@ import { default as classnames } from 'classnames';
import { darken } from 'polished'; import { darken } from 'polished';
import { deprecatedCss, ShelfIcon } from '../../common-elements'; import { deprecatedCss, ShelfIcon } from '../../common-elements';
import styled, { css, ResolvedThemeInterface } from '../../styled-components'; import styled, { css, media, ResolvedThemeInterface } from '../../styled-components';
export const OperationBadge = styled.span.attrs((props: { type: string }) => ({ export const OperationBadge = styled.span.attrs((props: { type: string }) => ({
className: `operation-type ${props.type}`, className: `operation-type ${props.type}`,
@ -172,18 +172,30 @@ export const RedocAttribution = styled.div`
${({ theme }) => ` ${({ theme }) => `
font-size: 0.8em; font-size: 0.8em;
margin-top: ${theme.spacing.unit * 2}px; margin-top: ${theme.spacing.unit * 2}px;
padding: 0 ${theme.spacing.unit * 4}px; text-align: center;
text-align: left; position: fixed;
width: ${theme.sidebar.width};
opacity: 0.7; bottom: 0px;
background: ${theme.sidebar.backgroundColor};
a, a,
a:visited, a:visited,
a:hover { a:hover {
color: ${theme.sidebar.textColor} !important; color: ${theme.sidebar.textColor} !important;
border-top: 1px solid ${darken(0.1, theme.sidebar.backgroundColor)};
padding: ${theme.spacing.unit}px 0; padding: ${theme.spacing.unit}px 0;
display: block; border-top: 1px solid ${darken(0.1, theme.sidebar.backgroundColor)};
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
} }
`}; `};
img {
width: 15px;
margin-right: 5px;
}
${media.lessThan('small')`
width: 100%;
`};
`; `;