diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2018-06-10 15:14:38 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2018-06-10 15:14:38 +0200 |
commit | f92c33c9a3dfe917e6933e968b90802b5288acc4 (patch) | |
tree | 4cafde6af9b077e6ea45ad570144c890312af65f /frontend/src/components/game-browser/GameList.jsx | |
parent | Use blueprint for error toasts instead of react-redux-toaster (diff) | |
download | seven-wonders-f92c33c9a3dfe917e6933e968b90802b5288acc4.tar.gz seven-wonders-f92c33c9a3dfe917e6933e968b90802b5288acc4.tar.bz2 seven-wonders-f92c33c9a3dfe917e6933e968b90802b5288acc4.zip |
Add IconButton component to work around Icon title issue
The issue about Buttons with icons is that the svg name appears as title
(tooltip) when hovering the icon, even if a title is specified on the
button itself:
https://github.com/palantir/blueprint/issues/2321
Diffstat (limited to 'frontend/src/components/game-browser/GameList.jsx')
-rw-r--r-- | frontend/src/components/game-browser/GameList.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/src/components/game-browser/GameList.jsx b/frontend/src/components/game-browser/GameList.jsx index 5ec2303b..08ce92e9 100644 --- a/frontend/src/components/game-browser/GameList.jsx +++ b/frontend/src/components/game-browser/GameList.jsx @@ -1,10 +1,10 @@ // @flow -import { Button, Icon } from '@blueprintjs/core'; import type { List } from 'immutable'; import React from 'react'; import { connect } from 'react-redux'; import type { Game } from '../../models/games'; import { actions, getAllGames } from '../../redux/games'; +import { IconButton } from '../shared/IconButton'; import './GameList.css'; import { GameStatus } from './GameStatus'; import { PlayerCount } from './PlayerCount'; @@ -51,8 +51,8 @@ const GameListItemRow = ({game, joinGame}) => ( const JoinButton = ({game, joinGame}) => { const disabled = game.state !== 'LOBBY'; - const icon = <Icon icon='arrow-right' title={false} />; - return <Button minimal disabled={disabled} icon={icon} title='Join Game' onClick={() => joinGame(game.id)}/>; + const onClick = () => joinGame(game.id); + return <IconButton minimal disabled={disabled} icon='arrow-right' title='Join Game' onClick={onClick}/>; }; const mapStateToProps = state => ({ |