diff options
author | Tom Schmidt <imtomhschmidt@gmail.com> | 2018-03-10 07:22:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-10 07:22:59 +0800 |
commit | 47af38ecb8d59789af9db2079e18ee0b6e589786 (patch) | |
tree | abd75e02d19d7c2e9c7b8df1ebe7152e2d364a40 /packages/website/ts/components/ui/badge.tsx | |
parent | 654c790c3df3ee857952a1023761f186bb9c777d (diff) | |
parent | 7116f100ee194f46d0e34782afa8f680791adc9c (diff) | |
download | dexon-0x-contracts-47af38ecb8d59789af9db2079e18ee0b6e589786.tar dexon-0x-contracts-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.gz dexon-0x-contracts-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.bz2 dexon-0x-contracts-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.lz dexon-0x-contracts-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.xz dexon-0x-contracts-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.zst dexon-0x-contracts-47af38ecb8d59789af9db2079e18ee0b6e589786.zip |
Merge branch 'development' into feature/website/web3-logging
Diffstat (limited to 'packages/website/ts/components/ui/badge.tsx')
-rw-r--r-- | packages/website/ts/components/ui/badge.tsx | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/packages/website/ts/components/ui/badge.tsx b/packages/website/ts/components/ui/badge.tsx deleted file mode 100644 index 056d741e0..000000000 --- a/packages/website/ts/components/ui/badge.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import * as _ from 'lodash'; -import * as React from 'react'; -import { Styles } from 'ts/types'; - -const styles: Styles = { - badge: { - width: 50, - fontSize: 11, - height: 10, - borderRadius: 5, - lineHeight: 0.9, - fontFamily: 'Roboto Mono', - marginLeft: 3, - marginRight: 3, - }, -}; - -interface BadgeProps { - title: string; - backgroundColor: string; -} - -interface BadgeState { - isHovering: boolean; -} - -export class Badge extends React.Component<BadgeProps, BadgeState> { - constructor(props: BadgeProps) { - super(props); - this.state = { - isHovering: false, - }; - } - public render() { - const badgeStyle = { - ...styles.badge, - backgroundColor: this.props.backgroundColor, - opacity: this.state.isHovering ? 0.7 : 1, - }; - return ( - <div - className="p1 center" - style={badgeStyle} - onMouseOver={this._setHoverState.bind(this, true)} - onMouseOut={this._setHoverState.bind(this, false)} - > - {this.props.title} - </div> - ); - } - private _setHoverState(isHovering: boolean) { - this.setState({ - isHovering, - }); - } -} |