mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 06:04:56 +03:00
move styled link into a different file
This commit is contained in:
parent
5f93f43675
commit
10790cc423
|
@ -5,6 +5,10 @@ import styled, { css } from '../styled-components';
|
|||
|
||||
import { HistoryService } from '../services';
|
||||
|
||||
export const StyledLink = styled.a`
|
||||
text-decoration: none;
|
||||
`;
|
||||
|
||||
// tslint:disable-next-line
|
||||
export const linkifyMixin = className => css`
|
||||
${className} {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { observer } from 'mobx-react';
|
||||
import * as React from 'react';
|
||||
import { LinkWrap } from '../../../src/components/SearchBox/styled.elements';
|
||||
import { StyledLink } from '../../../src/common-elements';
|
||||
|
||||
import { AppStore } from '../../services/AppStore';
|
||||
|
||||
|
@ -39,7 +39,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
|||
const license =
|
||||
(info.license && (
|
||||
<InfoSpan>
|
||||
License: <LinkWrap href={info.license.url}>{info.license.name}</LinkWrap>
|
||||
License: <StyledLink href={info.license.url}>{info.license.name}</StyledLink>
|
||||
</InfoSpan>
|
||||
)) ||
|
||||
null;
|
||||
|
@ -48,7 +48,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
|||
(info.contact &&
|
||||
info.contact.url && (
|
||||
<InfoSpan>
|
||||
URL: <LinkWrap href={info.contact.url}>{info.contact.url}</LinkWrap>
|
||||
URL: <StyledLink href={info.contact.url}>{info.contact.url}</StyledLink>
|
||||
</InfoSpan>
|
||||
)) ||
|
||||
null;
|
||||
|
@ -58,7 +58,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
|||
info.contact.email && (
|
||||
<InfoSpan>
|
||||
{info.contact.name || 'E-mail'}:{' '}
|
||||
<LinkWrap href={'mailto:' + info.contact.email}>{info.contact.email}</LinkWrap>
|
||||
<StyledLink href={'mailto:' + info.contact.email}>{info.contact.email}</StyledLink>
|
||||
</InfoSpan>
|
||||
)) ||
|
||||
null;
|
||||
|
@ -66,7 +66,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
|||
const terms =
|
||||
(info.termsOfService && (
|
||||
<InfoSpan>
|
||||
<LinkWrap href={info.termsOfService}>Terms of Service</LinkWrap>
|
||||
<StyledLink href={info.termsOfService}>Terms of Service</StyledLink>
|
||||
</InfoSpan>
|
||||
)) ||
|
||||
null;
|
||||
|
|
|
@ -7,10 +7,6 @@ export const SearchWrap = styled.div`
|
|||
padding: 5px 0;
|
||||
`;
|
||||
|
||||
export const LinkWrap = styled.a`
|
||||
text-decoration: none;
|
||||
`;
|
||||
|
||||
export const SearchInput = styled.input.attrs(() => ({
|
||||
className: 'search-input',
|
||||
}))`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { observer } from 'mobx-react';
|
||||
import * as React from 'react';
|
||||
import { LinkWrap } from '../../../src/components/SearchBox/styled.elements';
|
||||
import { StyledLink } from '../../../src/common-elements';
|
||||
|
||||
import { PerfectScrollbarWrap } from '../../common-elements/perfect-scrollbar';
|
||||
|
||||
|
@ -24,9 +24,9 @@ export class SideMenu extends React.Component<{ menu: MenuStore; className?: str
|
|||
>
|
||||
<MenuItems items={store.items} onActivate={this.activate} root={true}/>
|
||||
<RedocAttribution>
|
||||
<LinkWrap href="https://www.opentext.com/" target={'_blank'}>
|
||||
<StyledLink href="https://www.opentext.com/" target={'_blank'}>
|
||||
© Copyright 2019 OpenText Corp
|
||||
</LinkWrap>
|
||||
</StyledLink>
|
||||
</RedocAttribution>
|
||||
</PerfectScrollbarWrap>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user