From a3cfe62eb820a988ea7d3066670cafc5de8dfa64 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Fri, 24 Nov 2023 12:22:57 +0100 Subject: [PATCH] :art: [#36] Simplify building link modifiers list From PR feedback - unused arguments are removed, which allows for a simpler list building implementation. --- .../ProgressIndicator/ProgressIndicatorItem.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/ProgressIndicator/ProgressIndicatorItem.js b/src/components/ProgressIndicator/ProgressIndicatorItem.js index 507750bee..27abf1bbd 100644 --- a/src/components/ProgressIndicator/ProgressIndicatorItem.js +++ b/src/components/ProgressIndicator/ProgressIndicatorItem.js @@ -7,8 +7,12 @@ import {getBEMClassName} from 'utils'; import CompletionMark from './CompletionMark'; -const getLinkModifiers = (isActive, isApplicable, isCompleted) => { - return ['inherit', 'hover', isActive ? 'current' : undefined].filter(mod => mod !== undefined); +const getLinkModifiers = isActive => { + const modifiers = ['inherit', 'hover']; + if (isActive) { + modifiers.push('current'); + } + return modifiers; }; /** @@ -40,7 +44,7 @@ export const ProgressIndicatorItem = ({