aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-shared/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-09-28 19:08:12 +0800
committerFabio Berger <me@fabioberger.com>2018-09-28 19:08:12 +0800
commitba7de7204d29d4004c347190be7a3b8c84951b82 (patch)
tree9dddbd1ded45484a6cb968cdf799bf5ce991477b /packages/react-shared/src
parentf3ad64aa1c2930affbfd074316b5f407580b7523 (diff)
parenta737cfa004ee1dc18be935f61fb9c289ed5623fd (diff)
downloaddexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar
dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.gz
dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.bz2
dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.lz
dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.xz
dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.zst
dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.zip
merge development
Diffstat (limited to 'packages/react-shared/src')
-rw-r--r--packages/react-shared/src/components/anchor_title.tsx1
-rw-r--r--packages/react-shared/src/components/version_drop_down.tsx22
2 files changed, 11 insertions, 12 deletions
diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx
index 451ba1729..8f7e4af27 100644
--- a/packages/react-shared/src/components/anchor_title.tsx
+++ b/packages/react-shared/src/components/anchor_title.tsx
@@ -3,7 +3,6 @@ import { Link as ScrollLink } from 'react-scroll';
import { HeaderSizes, Styles } from '../types';
import { constants } from '../utils/constants';
-import { utils } from '../utils/utils';
const headerSizeToScrollOffset: { [headerSize: string]: number } = {
h2: -20,
diff --git a/packages/react-shared/src/components/version_drop_down.tsx b/packages/react-shared/src/components/version_drop_down.tsx
index e41590957..5ff4bed54 100644
--- a/packages/react-shared/src/components/version_drop_down.tsx
+++ b/packages/react-shared/src/components/version_drop_down.tsx
@@ -1,6 +1,6 @@
+import MenuItem from '@material-ui/core/MenuItem';
+import Select from '@material-ui/core/Select';
import * as _ from 'lodash';
-import DropDownMenu from 'material-ui/DropDownMenu';
-import MenuItem from 'material-ui/MenuItem';
import * as React from 'react';
export interface VersionDropDownProps {
@@ -15,23 +15,23 @@ export class VersionDropDown extends React.Component<VersionDropDownProps, Versi
public render(): React.ReactNode {
return (
<div className="mx-auto" style={{ width: 120 }}>
- <DropDownMenu
- maxHeight={300}
- value={this.props.selectedVersion}
- onChange={this._updateSelectedVersion.bind(this)}
- >
+ <Select value={this.props.selectedVersion} onChange={this._updateSelectedVersion.bind(this)}>
{this._renderDropDownItems()}
- </DropDownMenu>
+ </Select>
</div>
);
}
private _renderDropDownItems(): React.ReactNode[] {
const items = _.map(this.props.versions, version => {
- return <MenuItem key={version} value={version} primaryText={`v${version}`} />;
+ return (
+ <MenuItem key={version} value={version}>
+ v{version}
+ </MenuItem>
+ );
});
return items;
}
- private _updateSelectedVersion(_e: any, _index: number, semver: string): void {
- this.props.onVersionSelected(semver);
+ private _updateSelectedVersion(event: React.ChangeEvent<HTMLSelectElement>): void {
+ this.props.onVersionSelected(event.target.value);
}
}