fix: add ReDoc attribution link which was present in 1.x

This commit is contained in:
Roman Hotsiy 2018-06-01 19:44:28 +03:00
parent 9a34f22aff
commit d38f2f2a5a
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 24 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import { IMenuItem, MenuStore } from '../../services/MenuStore';
import { MenuItems } from './MenuItems';
import { PerfectScrollbar } from '../../common-elements/perfect-scrollbar';
import { RedocAttribution } from './styled.elements';
@observer
export class SideMenu extends React.Component<{ menu: MenuStore }> {
@ -29,6 +30,11 @@ export class SideMenu extends React.Component<{ menu: MenuStore }> {
) : (
<PerfectScrollbar updateFn={this.saveScrollUpdate}>
<MenuItems items={store.items} onActivate={this.activate} root={true} />
<RedocAttribution>
<a target="_blank" href="https://github.com/Rebilly/ReDoc">
Documentation Powered by ReDoc
</a>
</RedocAttribution>
</PerfectScrollbar>
)
}

View File

@ -160,3 +160,21 @@ export const MenuItemTitle = withProps<{ width?: string }>(styled.span)`
overflow: hidden;
text-overflow: ellipsis;
`;
export const RedocAttribution = styled.div`
font-size: 0.8em;
margin-top: ${({ theme }) => `${theme.spacingUnit / 2}px`};
padding: ${({ theme }) => `0 ${theme.spacingUnit}px`};
text-align: left;
opacity: 0.7;
a,
a:visited,
a:hover {
color: ${({ theme }) => theme.colors.text} !important;
border-top: 1px solid #e1e1e1;
padding-top: 10px;
display: block;
}
`;