import React from 'react'; import RightSlider from './RightSlider'; const getActiveButtons = (hasSkippedActions) => [hasSkippedActions && 'Sweep', 'Commit'].filter((a) => a); const ActionListHeader = ({ styling, onSearch, hasSkippedActions, hasStagedActions, onCommit, onSweep, hideMainButtons, }) => (
onSearch(e.target.value)} placeholder="filter..." /> {!hideMainButtons && (
{getActiveButtons(hasSkippedActions).map((btn) => (
({ Commit: onCommit, Sweep: onSweep, }[btn]()) } {...styling( ['selectorButton', 'selectorButtonSmall'], false, true )} > {btn}
))}
)}
); export default ActionListHeader;