Skip to content

Commit a6c0d6a

Browse files
committed
fixed destructuring issue
1 parent 89d9474 commit a6c0d6a

7 files changed

Lines changed: 10 additions & 9 deletions

File tree

File renamed without changes.

src/bubble/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface IBubbleProps {
66
enableStepClick: boolean,
77
renderAdornment?(step: IStep, index: number): ReactElement,
88
index: number,
9-
currentActiveStepIndexVal: number,
9+
currentActiveStepIndexVal?: number,
1010
handleStepClick(index: number): void,
1111
getBubbleStyles?(step: IStep, index: number): object,
1212
getActiveBubbleStyles?(step: IStep, index: number): object,

src/stepper-component/index.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/stepper-component/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import Stepper from './stepperComponent';
2+
3+
export default Stepper;

src/stepper-component/stepperComponent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Stepper = (props: IStepperProps): ReactElement => {
1010
enableStepClick = false,
1111
onStepClick,
1212
renderAdornment,
13-
stylesOverride
13+
stylesOverride = {}
1414
} = props;
1515

1616
const {
@@ -81,9 +81,9 @@ const Stepper = (props: IStepperProps): ReactElement => {
8181
{index < steps?.length - 1 && (
8282
<div style={{...styles.lineSeparator,
8383
...((getLineSeparatorStyles && getLineSeparatorStyles(step, index)) || {}),
84-
...((index > currentActiveStepIndexVal - 1) && styles.inactiveStepLineSeparator || {}),
85-
...((index > currentActiveStepIndexVal - 1&& getInactiveLineSeparatorStyles && getInactiveLineSeparatorStyles(step, index)) || {})
86-
84+
...((currentActiveStepIndexVal && index > currentActiveStepIndexVal - 1) && styles.inactiveStepLineSeparator || {}),
85+
...((currentActiveStepIndexVal && index > currentActiveStepIndexVal - 1
86+
&& getInactiveLineSeparatorStyles && getInactiveLineSeparatorStyles(step, index)) || {})
8787
}} />
8888
)}
8989
</div>

src/stepper-component/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface IStep {
88

99
export interface IStepperProps {
1010
steps: IStep[],
11-
currentActiveStepIndex: number,
11+
currentActiveStepIndex?: number,
1212
onStepClick?(stepIndex: number): void,
1313
enableStepClick?: boolean,
1414
renderAdornment?(step: IStep, index: number): ReactElement,

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"allowSyntheticDefaultImports": true,
1414
"lib": ["es2018", "dom"],
1515
"moduleResolution": "node",
16+
"strictNullChecks": true
1617
},
1718
"files": [
1819
"global.d.ts"

0 commit comments

Comments
 (0)