mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +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 { 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>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
`;
|
||||
|
|
Loading…
Reference in New Issue
Block a user