mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-14 04:46:34 +03:00
fix: add ReDoc attribution link which was present in 1.x
This commit is contained in:
parent
9a34f22aff
commit
d38f2f2a5a
|
@ -6,6 +6,7 @@ import { IMenuItem, MenuStore } from '../../services/MenuStore';
|
||||||
import { MenuItems } from './MenuItems';
|
import { MenuItems } from './MenuItems';
|
||||||
|
|
||||||
import { PerfectScrollbar } from '../../common-elements/perfect-scrollbar';
|
import { PerfectScrollbar } from '../../common-elements/perfect-scrollbar';
|
||||||
|
import { RedocAttribution } from './styled.elements';
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class SideMenu extends React.Component<{ menu: MenuStore }> {
|
export class SideMenu extends React.Component<{ menu: MenuStore }> {
|
||||||
|
@ -29,6 +30,11 @@ export class SideMenu extends React.Component<{ menu: MenuStore }> {
|
||||||
) : (
|
) : (
|
||||||
<PerfectScrollbar updateFn={this.saveScrollUpdate}>
|
<PerfectScrollbar updateFn={this.saveScrollUpdate}>
|
||||||
<MenuItems items={store.items} onActivate={this.activate} root={true} />
|
<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>
|
</PerfectScrollbar>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,3 +160,21 @@ export const MenuItemTitle = withProps<{ width?: string }>(styled.span)`
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
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;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user