Upgrading all buttons to Button component
This commit is contained in:
@ -20,6 +20,7 @@ import {
|
||||
} from '../../util/helpers';
|
||||
import { arrayOf, sortItems } from '../../util/arrays';
|
||||
import { i18n, I18n } from '../../locale';
|
||||
import Button from '../../components/Button';
|
||||
|
||||
class LibraryBrowseDirectory extends React.Component {
|
||||
constructor(props) {
|
||||
@ -217,15 +218,23 @@ class LibraryBrowseDirectory extends React.Component {
|
||||
handleChange={(value) => { uiActions.set({ library_directory_view: value }); uiActions.hideContextMenu(); }}
|
||||
/>
|
||||
{tracks && (
|
||||
<a className="button button--no-hover" onClick={(e) => { uiActions.hideContextMenu(); this.playAll(e, all_tracks); }}>
|
||||
<Button
|
||||
onClick={(e) => { uiActions.hideContextMenu(); this.playAll(e, all_tracks); }}
|
||||
noHover
|
||||
tracking={{ category: 'Directory', action: 'Play' }}
|
||||
>
|
||||
<Icon name="play_circle_filled" />
|
||||
<I18n path="actions.play_all" />
|
||||
</a>
|
||||
</Button>
|
||||
)}
|
||||
<a className="button button--no-hover" onClick={(e) => { uiActions.hideContextMenu(); this.goBack(e); }}>
|
||||
<Button
|
||||
onClick={(e) => { uiActions.hideContextMenu(); this.goBack(e); }}
|
||||
noHover
|
||||
tracking={{ category: 'Directory', action: 'Back' }}
|
||||
>
|
||||
<Icon name="keyboard_backspace" />
|
||||
<I18n path="actions.back" />
|
||||
</a>
|
||||
</Button>
|
||||
</span>
|
||||
);
|
||||
|
||||
|
||||
@ -279,10 +279,14 @@ class LibraryPlaylists extends React.Component {
|
||||
options={source_options}
|
||||
handleChange={(value) => { this.props.uiActions.set({ library_playlists_source: value }); this.props.uiActions.hideContextMenu(); }}
|
||||
/>
|
||||
<Link className="button button--no-hover" to="/playlist/create">
|
||||
<Button
|
||||
to="/playlist/create"
|
||||
noHover
|
||||
tracking={{ category: 'Playlist', action: 'Create' }}
|
||||
>
|
||||
<Icon name="add_box" />
|
||||
<I18n path="actions.add" />
|
||||
</Link>
|
||||
</Button>
|
||||
</span>
|
||||
);
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ import * as mopidyActions from '../../services/mopidy/actions';
|
||||
import * as spotifyActions from '../../services/spotify/actions';
|
||||
import { isLoading } from '../../util/helpers';
|
||||
import { I18n, i18n } from '../../locale';
|
||||
import Button from '../../components/Button';
|
||||
|
||||
class LibraryTracks extends React.Component {
|
||||
componentDidMount() {
|
||||
@ -63,10 +64,14 @@ class LibraryTracks extends React.Component {
|
||||
}
|
||||
|
||||
const options = (
|
||||
<a className="button button--no-hover" onClick={(e) => this.playAll(e)}>
|
||||
<Button
|
||||
onClick={(e) => this.playAll(e)}
|
||||
tracking={{ category: 'LibraryTracks', action: 'Play' }}
|
||||
noHover
|
||||
>
|
||||
<Icon name="play_circle_filled" />
|
||||
<I18n path="actions.play_all" />
|
||||
</a>
|
||||
</Button>
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user