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';
|
import { HistoryService } from '../services';
|
||||||
|
|
||||||
|
export const StyledLink = styled.a`
|
||||||
|
text-decoration: none;
|
||||||
|
`;
|
||||||
|
|
||||||
// tslint:disable-next-line
|
// tslint:disable-next-line
|
||||||
export const linkifyMixin = className => css`
|
export const linkifyMixin = className => css`
|
||||||
${className} {
|
${className} {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
import * as React from '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';
|
import { AppStore } from '../../services/AppStore';
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
||||||
const license =
|
const license =
|
||||||
(info.license && (
|
(info.license && (
|
||||||
<InfoSpan>
|
<InfoSpan>
|
||||||
License: <LinkWrap href={info.license.url}>{info.license.name}</LinkWrap>
|
License: <StyledLink href={info.license.url}>{info.license.name}</StyledLink>
|
||||||
</InfoSpan>
|
</InfoSpan>
|
||||||
)) ||
|
)) ||
|
||||||
null;
|
null;
|
||||||
|
@ -48,7 +48,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
||||||
(info.contact &&
|
(info.contact &&
|
||||||
info.contact.url && (
|
info.contact.url && (
|
||||||
<InfoSpan>
|
<InfoSpan>
|
||||||
URL: <LinkWrap href={info.contact.url}>{info.contact.url}</LinkWrap>
|
URL: <StyledLink href={info.contact.url}>{info.contact.url}</StyledLink>
|
||||||
</InfoSpan>
|
</InfoSpan>
|
||||||
)) ||
|
)) ||
|
||||||
null;
|
null;
|
||||||
|
@ -58,7 +58,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
||||||
info.contact.email && (
|
info.contact.email && (
|
||||||
<InfoSpan>
|
<InfoSpan>
|
||||||
{info.contact.name || 'E-mail'}:{' '}
|
{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>
|
</InfoSpan>
|
||||||
)) ||
|
)) ||
|
||||||
null;
|
null;
|
||||||
|
@ -66,7 +66,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
||||||
const terms =
|
const terms =
|
||||||
(info.termsOfService && (
|
(info.termsOfService && (
|
||||||
<InfoSpan>
|
<InfoSpan>
|
||||||
<LinkWrap href={info.termsOfService}>Terms of Service</LinkWrap>
|
<StyledLink href={info.termsOfService}>Terms of Service</StyledLink>
|
||||||
</InfoSpan>
|
</InfoSpan>
|
||||||
)) ||
|
)) ||
|
||||||
null;
|
null;
|
||||||
|
|
|
@ -7,10 +7,6 @@ export const SearchWrap = styled.div`
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const LinkWrap = styled.a`
|
|
||||||
text-decoration: none;
|
|
||||||
`;
|
|
||||||
|
|
||||||
export const SearchInput = styled.input.attrs(() => ({
|
export const SearchInput = styled.input.attrs(() => ({
|
||||||
className: 'search-input',
|
className: 'search-input',
|
||||||
}))`
|
}))`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
import * as React from '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';
|
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}/>
|
<MenuItems items={store.items} onActivate={this.activate} root={true}/>
|
||||||
<RedocAttribution>
|
<RedocAttribution>
|
||||||
<LinkWrap href="https://www.opentext.com/" target={'_blank'}>
|
<StyledLink href="https://www.opentext.com/" target={'_blank'}>
|
||||||
© Copyright 2019 OpenText Corp
|
© Copyright 2019 OpenText Corp
|
||||||
</LinkWrap>
|
</StyledLink>
|
||||||
</RedocAttribution>
|
</RedocAttribution>
|
||||||
</PerfectScrollbarWrap>
|
</PerfectScrollbarWrap>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user