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 #157 from epwinchell/toolbar_fix
Browse files Browse the repository at this point in the history
Toolbar tag fix
  • Loading branch information
martinpovolny authored Oct 29, 2019
2 parents b6393d6 + 764f278 commit f207827
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/toolbar/Toolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ export const ToolbarGroup = ({ group, onClick }) => {
}

return (
<span className="miq-toolbar-group form-group">
<div className="miq-toolbar-group form-group">
{visibleItems.map((i, index) => buttonCase(i, index, onClick))}
</span>
</div>
);
};

Expand Down
32 changes: 18 additions & 14 deletions src/toolbar/stories/Toolbar.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,28 @@ const toolbarBigData = require('../data/toolbar-big.json');
storiesOf('Toolbar', module)
.add('Toolbar', () => (
<React.Fragment>
<div style={{ padding: 16 }}>
<div className="container-fluid">
<div className="toolbar-pf row">
<Toolbar
onClick={action('Toolbar click')}
onViewClick={action('Toolbar click')}
groups={toolbarData}
views={viewData}
/>
<div className="col-sm-12">
<Toolbar
onClick={action('Toolbar click')}
onViewClick={action('Toolbar click')}
groups={toolbarData}
views={viewData}
/>
</div>
</div>
</div>
<div style={{ padding: 16 }}>
<div className="container-fluid">
<div className="toolbar-pf row">
<Toolbar
onClick={action('Toolbar click')}
onViewClick={action('Toolbar click')}
groups={toolbarBigData}
views={viewData}
/>
<div className="col-sm-12">
<Toolbar
onClick={action('Toolbar click')}
onViewClick={action('Toolbar click')}
groups={toolbarBigData}
views={viewData}
/>
</div>
</div>
</div>
</React.Fragment>
Expand Down
6 changes: 1 addition & 5 deletions src/toolbar/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@
}
}

// copied: ui-components/src/styles/ui-components.scss
// overrides _toolbar.scss to account for intermediate Angular markup and adjusted the margins to properly style wrapped form-groups
.miq-toolbar-actions {
margin-top: -10px;
.form-group:first-of-type {
padding-left: 0;
}
margin-left: -20px; /* this compensates for toolbar-pf-filter not being in the first position */
.form-group {
margin-top: 10px;
padding-left: 20px;
Expand Down

0 comments on commit f207827

Please sign in to comment.