Tradeshift / tradeshift-ui

Tradeshift UI is a framework-agnostic JavaScript library to help Tradeshift App developers to create cohesive user experiences and to provide reusable UI components.
https://ui.tradeshift.com
Other
33 stars 44 forks source link

Adding custom classes to toolbar buttons prevents compact() #333

Closed akarnachuk closed 7 years ago

akarnachuk commented 7 years ago

Bug report

Adding custom classes to toolbar buttons prevents compact() I've modified example and added tst-button-1 and tst-button-2 classes to ts-tertiary buttons.

Tradeshift UI version affected

v8.2.1

Expected Behavior

When there are more then three toolbar buttons, tertiary buttons would be shown compactly - inside the menu.

Actual Behavior

All the buttons are shown at toolbar without compacting.

Steps to reproduce

Use example from http://ui.tradeshift.com/#components/bars/toolbar.html to run this code

ts.ui.ToolBar.buttons([
    {label : 'Primary', type : 'ts-primary'},
    {label : 'Secondary', type : 'ts-secondary'},
    {label : 'Tertiary One', type : 'ts-tertiary tst-button-1'},
    {label : 'Tertiary Two', type : 'ts-tertiary tst-button-2'}
]);
wiredearp commented 7 years ago

:see_no_evil: Doh!