Add tooltips capabilities to buttons (#5562)
Add tooltips for buttons on ActionBar if text not visible
This commit is contained in:
committed by
Jaco Greeff
parent
3e86b2e666
commit
eff4cde738
@@ -31,6 +31,7 @@ import Loading from '~/ui/Loading';
|
||||
import Portal from '~/ui/Portal';
|
||||
import { nodeOrStringProptype } from '~/util/proptypes';
|
||||
import { validateAddress } from '~/util/validation';
|
||||
import { toString } from '~/util/messages';
|
||||
|
||||
import AddressSelectStore from './addressSelectStore';
|
||||
import styles from './addressSelect.css';
|
||||
@@ -186,12 +187,7 @@ class AddressSelect extends Component {
|
||||
}
|
||||
|
||||
const id = `addressSelect_${++currentId}`;
|
||||
const ilHint = typeof hint === 'string' || !(hint && hint.props)
|
||||
? (hint || '')
|
||||
: this.context.intl.formatMessage(
|
||||
hint.props,
|
||||
hint.props.values || {}
|
||||
);
|
||||
const ilHint = toString(this.context, hint);
|
||||
|
||||
return (
|
||||
<Portal
|
||||
|
||||
@@ -20,6 +20,7 @@ import { noop } from 'lodash';
|
||||
import keycode from 'keycode';
|
||||
|
||||
import { nodeOrStringProptype } from '~/util/proptypes';
|
||||
import { toString } from '~/util/messages';
|
||||
|
||||
import CopyToClipboard from '../../CopyToClipboard';
|
||||
|
||||
@@ -149,12 +150,7 @@ export default class Input extends Component {
|
||||
? UNDERLINE_FOCUSED
|
||||
: readOnly && typeof focused !== 'boolean' ? { display: 'none' } : null;
|
||||
|
||||
const textValue = typeof value !== 'string' && (value && value.props)
|
||||
? this.context.intl.formatMessage(
|
||||
value.props,
|
||||
value.props.values || {}
|
||||
)
|
||||
: value;
|
||||
const textValue = toString(this.context, value);
|
||||
|
||||
return (
|
||||
<div className={ styles.container } style={ style }>
|
||||
|
||||
Reference in New Issue
Block a user