Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #158 from epwinchell/toolbar_view_fix
Browse files Browse the repository at this point in the history
View button responsiveness fix
  • Loading branch information
martinpovolny authored Nov 14, 2019
2 parents edbc859 + e42d782 commit 1718e78
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions src/toolbar/ToolbarView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ import { adjustColor } from './utility';
const classNames = require('classnames');

export const ToolbarView = ({ views, onClick }) => (
<div className="toolbar-pf-view-selector pull-right form-group">
{views.map(view => (
<button
key={view.id}
id={view.id}
name={view.name}
title={view.title}
className={classNames('btn btn-link', { active: view.selected })}
data-url={view.url}
data-url_parms={view.url_parms}
data-send_checked={view.send_checked ? 'true' : ''}
data-prompt={view.prompt}
data-popup={view.popup}
onClick={() => onClick(view)}
>
<i className={view.icon} style={{ color: adjustColor(view.color, view.enabled) }} />
</button>
))
}
<div className="toolbar-pf-action-right">
<div className="form-group toolbar-pf-view-selector">
{views.map(view => (
<button
key={view.id}
id={view.id}
name={view.name}
title={view.title}
className={classNames('btn btn-link', { active: view.selected })}
data-url={view.url}
data-url_parms={view.url_parms}
data-send_checked={view.send_checked ? 'true' : ''}
data-prompt={view.prompt}
data-popup={view.popup}
onClick={() => onClick(view)}
>
<i className={view.icon} style={{ color: adjustColor(view.color, view.enabled) }} />
</button>
))
}
</div>
</div>
);

Expand Down

0 comments on commit 1718e78

Please sign in to comment.