diff options
author | F. Eugene Aumson <gene@aumson.org> | 2018-08-31 21:22:05 +0800 |
---|---|---|
committer | F. Eugene Aumson <gene@aumson.org> | 2018-08-31 21:22:05 +0800 |
commit | 72419816a88d6afcf8727cefe69e3a2fbe479f55 (patch) | |
tree | 076252c005a879c4ea122d467348d1097e41a574 /packages/react-shared | |
parent | 9a4e6da02f606e97b470a6545b2ce5baf14b03e6 (diff) | |
parent | 675964dc5c6c44eb07023fd036857ecd3f14dcf3 (diff) | |
download | dexon-0x-contracts-72419816a88d6afcf8727cefe69e3a2fbe479f55.tar dexon-0x-contracts-72419816a88d6afcf8727cefe69e3a2fbe479f55.tar.gz dexon-0x-contracts-72419816a88d6afcf8727cefe69e3a2fbe479f55.tar.bz2 dexon-0x-contracts-72419816a88d6afcf8727cefe69e3a2fbe479f55.tar.lz dexon-0x-contracts-72419816a88d6afcf8727cefe69e3a2fbe479f55.tar.xz dexon-0x-contracts-72419816a88d6afcf8727cefe69e3a2fbe479f55.tar.zst dexon-0x-contracts-72419816a88d6afcf8727cefe69e3a2fbe479f55.zip |
Merge remote-tracking branch 'upstream/development' into sol-doc
Diffstat (limited to 'packages/react-shared')
-rw-r--r-- | packages/react-shared/package.json | 12 | ||||
-rw-r--r-- | packages/react-shared/src/components/anchor_title.tsx | 1 | ||||
-rw-r--r-- | packages/react-shared/src/components/version_drop_down.tsx | 22 | ||||
-rw-r--r-- | packages/react-shared/tsconfig.json | 5 |
4 files changed, 20 insertions, 20 deletions
diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index eb6679044..57aa9d51d 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -33,6 +33,7 @@ "typescript": "3.0.1" }, "dependencies": { + "@material-ui/core": "^3.0.1", "@types/is-mobile": "0.3.0", "@types/lodash": "4.14.104", "@types/material-ui": "0.18.0", @@ -44,13 +45,12 @@ "change-case": "^3.0.2", "is-mobile": "^0.2.2", "lodash": "^4.17.5", - "material-ui": "^0.17.1", - "react": "15.6.1", - "react-dom": "15.6.1", - "react-highlight": "0xproject/react-highlight", + "material-ui": "^0.20.0", + "react": "^16.4.2", + "react-dom": "^16.4.2", + "react-highlight": "0xproject/react-highlight#2f40a42e0a3f0ad126f9f42d505b97b603fc7162", "react-markdown": "^3.2.2", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330", - "react-tap-event-plugin": "^2.0.1" + "react-scroll": "0xproject/react-scroll#similar-to-pr-330" }, "publishConfig": { "access": "public" 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); } } diff --git a/packages/react-shared/tsconfig.json b/packages/react-shared/tsconfig.json index 687bd1f4e..5abe0ab4e 100644 --- a/packages/react-shared/tsconfig.json +++ b/packages/react-shared/tsconfig.json @@ -1,9 +1,10 @@ { "extends": "../../tsconfig", "compilerOptions": { - "outDir": "./lib/", + "outDir": "lib", + "rootDir": "src", "jsx": "react", - "baseUrl": "./", + "baseUrl": ".", "paths": { "*": ["node_modules/@types/*", "*"] } |