Skip to content

Commit cc29d19

Browse files
committed
improve UI handling by the prop component ActionButton
1 parent d0ed654 commit cc29d19

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/components/generics/SearcherActionButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ const SearcherActionButton = ({ onClick, startIcon, label }) => {
2222
);
2323
};
2424

25-
export default SearcherActionButton;
25+
export default SearcherActionButton;

src/components/generics/SearcherPane.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class SearcherPane extends Component {
103103
appliedFiltersRowStructure = null,
104104
setAppliedFiltersRowStructure = null,
105105
applyNumberCircle = null,
106+
ActionButton = SearcherActionButton,
106107
} = this.props;
107108
return (
108109
<StyledSearcherPane>
@@ -135,23 +136,23 @@ class SearcherPane extends Component {
135136
)}
136137
{!!actions &&
137138
actions.map((a, idx) => (
138-
<SearcherActionButton
139+
<ActionButton
139140
key={`action-${idx}`}
140141
onClick={a.action}
141142
startIcon={a.icon}
142143
label={a.label || ""}
143144
/>
144145
))}
145146
{!!reset && (
146-
<SearcherActionButton
147+
<ActionButton
147148
key="action-reset"
148149
startIcon={<ResetFilterIcon />}
149150
onClick={this.debouncedReset}
150151
label={formatMessage(this.props.intl, module, "resetFilterTooltip")}
151152
/>
152153
)}
153154
{!!refresh && (
154-
<SearcherActionButton
155+
<ActionButton
155156
key="action-refresh"
156157
startIcon={<DefaultSearchIcon />}
157158
onClick={this.debouncedRefresh}

0 commit comments

Comments
 (0)