-
Notifications
You must be signed in to change notification settings - Fork 295
/
WalletTransactionsSearch.tsx
44 lines (40 loc) · 1.13 KB
/
WalletTransactionsSearch.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// @flow
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { defineMessages, intlShape } from 'react-intl';
import { Input } from 'react-polymorph/lib/components/Input';
import { InputSkin } from 'react-polymorph/lib/skins/simple/InputSkin';
import styles from './WalletTransactionsSearch.scss';
const messages = defineMessages({
searchHint: {
id: 'wallet.transactions.search.hint',
defaultMessage: '!!!Search transaction',
description: 'Hint in the transactions search box.',
},
});
type Props = {
searchTerm: string,
onChange: Function,
};
@observer
export default class WalletTransactionsSearch extends Component<Props> {
static contextTypes = {
intl: intlShape.isRequired,
};
render() {
const { intl } = this.context;
const { searchTerm, onChange } = this.props;
return (
<div className={styles.component}>
<Input
className={styles.input}
type="text"
placeholder={intl.formatMessage(messages.searchHint)}
value={searchTerm}
onChange={onChange}
skin={InputSkin}
/>
</div>
);
}
}