aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/shared
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/pages/shared')
-rw-r--r--packages/website/ts/pages/shared/anchor_title.tsx12
-rw-r--r--packages/website/ts/pages/shared/markdown_section.tsx4
-rw-r--r--packages/website/ts/pages/shared/nested_sidebar_menu.tsx10
-rw-r--r--packages/website/ts/pages/shared/section_header.tsx2
-rw-r--r--packages/website/ts/pages/shared/version_drop_down.tsx6
5 files changed, 15 insertions, 19 deletions
diff --git a/packages/website/ts/pages/shared/anchor_title.tsx b/packages/website/ts/pages/shared/anchor_title.tsx
index dfa9401ae..0a3674fd9 100644
--- a/packages/website/ts/pages/shared/anchor_title.tsx
+++ b/packages/website/ts/pages/shared/anchor_title.tsx
@@ -1,8 +1,8 @@
import * as React from 'react';
-import {Styles, HeaderSizes} from 'ts/types';
-import {utils} from 'ts/utils/utils';
-import {constants} from 'ts/utils/constants';
import {Link as ScrollLink} from 'react-scroll';
+import {HeaderSizes, Styles} from 'ts/types';
+import {constants} from 'ts/utils/constants';
+import {utils} from 'ts/utils/utils';
const headerSizeToScrollOffset: {[headerSize: string]: number} = {
h2: -20,
@@ -59,11 +59,7 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt
public render() {
let opacity = 0;
if (this.props.shouldShowAnchor) {
- if (this.state.isHovering) {
- opacity = 0.6;
- } else {
- opacity = 1;
- }
+ opacity = this.state.isHovering ? 0.6 : 1;
}
return (
<div className="relative flex" style={{...styles[this.props.headerSize], ...styles.headers}}>
diff --git a/packages/website/ts/pages/shared/markdown_section.tsx b/packages/website/ts/pages/shared/markdown_section.tsx
index 32b55abc8..8686e80b6 100644
--- a/packages/website/ts/pages/shared/markdown_section.tsx
+++ b/packages/website/ts/pages/shared/markdown_section.tsx
@@ -1,12 +1,12 @@
import * as _ from 'lodash';
+import RaisedButton from 'material-ui/RaisedButton';
import * as React from 'react';
import * as ReactMarkdown from 'react-markdown';
import {Element as ScrollElement} from 'react-scroll';
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
-import {utils} from 'ts/utils/utils';
import {MarkdownCodeBlock} from 'ts/pages/shared/markdown_code_block';
-import RaisedButton from 'material-ui/RaisedButton';
import {HeaderSizes} from 'ts/types';
+import {utils} from 'ts/utils/utils';
interface MarkdownSectionProps {
sectionName: string;
diff --git a/packages/website/ts/pages/shared/nested_sidebar_menu.tsx b/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
index e69506bb8..69e32aecb 100644
--- a/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
+++ b/packages/website/ts/pages/shared/nested_sidebar_menu.tsx
@@ -1,13 +1,13 @@
import * as _ from 'lodash';
-import * as React from 'react';
import MenuItem from 'material-ui/MenuItem';
import {colors} from 'material-ui/styles';
-import {utils} from 'ts/utils/utils';
-import {constants} from 'ts/utils/constants';
+import * as React from 'react';
+import {Link as ScrollLink} from 'react-scroll';
import {VersionDropDown} from 'ts/pages/shared/version_drop_down';
-import {ZeroExJsDocSections, Styles, MenuSubsectionsBySection, Docs} from 'ts/types';
+import {Docs, MenuSubsectionsBySection, Styles, ZeroExJsDocSections} from 'ts/types';
+import {constants} from 'ts/utils/constants';
import {typeDocUtils} from 'ts/utils/typedoc_utils';
-import {Link as ScrollLink} from 'react-scroll';
+import {utils} from 'ts/utils/utils';
interface NestedSidebarMenuProps {
topLevelMenu: {[topLevel: string]: string[]};
diff --git a/packages/website/ts/pages/shared/section_header.tsx b/packages/website/ts/pages/shared/section_header.tsx
index 5937be13b..b5119b128 100644
--- a/packages/website/ts/pages/shared/section_header.tsx
+++ b/packages/website/ts/pages/shared/section_header.tsx
@@ -1,8 +1,8 @@
import * as React from 'react';
import {Element as ScrollElement} from 'react-scroll';
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
-import {utils} from 'ts/utils/utils';
import {HeaderSizes} from 'ts/types';
+import {utils} from 'ts/utils/utils';
interface SectionHeaderProps {
sectionName: string;
diff --git a/packages/website/ts/pages/shared/version_drop_down.tsx b/packages/website/ts/pages/shared/version_drop_down.tsx
index f29547c9c..8f4f1a35b 100644
--- a/packages/website/ts/pages/shared/version_drop_down.tsx
+++ b/packages/website/ts/pages/shared/version_drop_down.tsx
@@ -1,9 +1,9 @@
import * as _ from 'lodash';
-import * as React from 'react';
-import MenuItem from 'material-ui/MenuItem';
import DropDownMenu from 'material-ui/DropDownMenu';
-import {constants} from 'ts/utils/constants';
+import MenuItem from 'material-ui/MenuItem';
+import * as React from 'react';
import {Docs} from 'ts/types';
+import {constants} from 'ts/utils/constants';
interface VersionDropDownProps {
selectedVersion: string;