mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-15 21:08:57 +00:00
Remove unused components
This commit is contained in:
parent
5984ad047f
commit
9ef8d8f618
@ -1,51 +0,0 @@
|
|||||||
/* @flow */
|
|
||||||
|
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
children: React.Node,
|
|
||||||
className: string,
|
|
||||||
isDisabled: boolean,
|
|
||||||
isFocused: boolean,
|
|
||||||
isSelected: boolean,
|
|
||||||
onFocus: Function,
|
|
||||||
onSelect: Function,
|
|
||||||
option: any,
|
|
||||||
}
|
|
||||||
|
|
||||||
export default class CoinSelectOption extends React.Component<Props> {
|
|
||||||
constructor(props: Props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleMouseDown(event: MouseEvent) {
|
|
||||||
event.preventDefault();
|
|
||||||
event.stopPropagation();
|
|
||||||
this.props.onSelect(this.props.option, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleMouseEnter(event: MouseEvent) {
|
|
||||||
this.props.onFocus(this.props.option, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleMouseMove(event: MouseEvent) {
|
|
||||||
if (this.props.isFocused) return;
|
|
||||||
this.props.onFocus(this.props.option, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const css = `${this.props.className} ${this.props.option.value}`;
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={css}
|
|
||||||
onMouseDown={this.handleMouseDown.bind(this)}
|
|
||||||
onMouseEnter={this.handleMouseEnter.bind(this)}
|
|
||||||
onMouseMove={this.handleMouseMove.bind(this)}
|
|
||||||
title={this.props.option.label}
|
|
||||||
>
|
|
||||||
<span>{ this.props.children }</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
/* @flow */
|
|
||||||
|
|
||||||
|
|
||||||
import * as React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
|
|
||||||
|
|
||||||
export const FeeSelectValue = (props: any): any => (
|
|
||||||
<div>
|
|
||||||
<div className="Select-value fee-option">
|
|
||||||
<span className="fee-value">{ props.value.value }</span>
|
|
||||||
<span className="fee-label">{ props.value.label }</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
children: React.Node,
|
|
||||||
className: string,
|
|
||||||
isDisabled: boolean,
|
|
||||||
isFocused: boolean,
|
|
||||||
isSelected: boolean,
|
|
||||||
onFocus: Function,
|
|
||||||
onSelect: Function,
|
|
||||||
option: any,
|
|
||||||
}
|
|
||||||
|
|
||||||
export class FeeSelectOption extends React.Component<Props> {
|
|
||||||
constructor(props: Props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleMouseDown(event: MouseEvent) {
|
|
||||||
event.preventDefault();
|
|
||||||
event.stopPropagation();
|
|
||||||
this.props.onSelect(this.props.option, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleMouseEnter(event: MouseEvent) {
|
|
||||||
this.props.onFocus(this.props.option, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleMouseMove(event: MouseEvent) {
|
|
||||||
if (this.props.isFocused) return;
|
|
||||||
this.props.onFocus(this.props.option, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={this.props.className}
|
|
||||||
onMouseDown={this.handleMouseDown.bind(this)}
|
|
||||||
onMouseEnter={this.handleMouseEnter.bind(this)}
|
|
||||||
onMouseMove={this.handleMouseMove.bind(this)}
|
|
||||||
>
|
|
||||||
<span className="fee-value">{ this.props.option.value }</span>
|
|
||||||
<span className="fee-label">{ this.props.option.label }</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user