@rpg-engine/long-bow 0.5.97 → 0.5.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Stepper.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +7 -4
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +7 -4
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Stepper.tsx +10 -4
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ interface IStepperProps {
|
|
|
13
13
|
steps: IStep[];
|
|
14
14
|
finalCTAButton?: {
|
|
15
15
|
label: string;
|
|
16
|
-
onClick: () => void | Promise<void
|
|
16
|
+
onClick: (() => void) | (() => Promise<void>) | ((e: any) => Promise<void>);
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -32,7 +32,11 @@ export const Stepper: React.FC<IStepperProps> = ({ steps, finalCTAButton }) => {
|
|
|
32
32
|
<StepperContainer>
|
|
33
33
|
<StepperTop>
|
|
34
34
|
{Array.from({ length: totalSteps }, (_, i) => (
|
|
35
|
-
<ProgressIndicator
|
|
35
|
+
<ProgressIndicator
|
|
36
|
+
key={i}
|
|
37
|
+
isActive={i <= currentStep}
|
|
38
|
+
onClick={() => onStepChange(i)}
|
|
39
|
+
/>
|
|
36
40
|
))}
|
|
37
41
|
</StepperTop>
|
|
38
42
|
|
|
@@ -81,6 +85,8 @@ const StepperTop = styled.div`
|
|
|
81
85
|
flex-wrap: wrap;
|
|
82
86
|
justify-content: center;
|
|
83
87
|
align-items: center;
|
|
88
|
+
|
|
89
|
+
margin-bottom: 1rem;
|
|
84
90
|
`;
|
|
85
91
|
|
|
86
92
|
const StepperBody = styled.div`
|
|
@@ -88,6 +94,7 @@ const StepperBody = styled.div`
|
|
|
88
94
|
`;
|
|
89
95
|
|
|
90
96
|
const StepperFooter = styled.div`
|
|
97
|
+
margin-top: 1rem;
|
|
91
98
|
flex: 1; // Small footer
|
|
92
99
|
|
|
93
100
|
display: flex;
|
|
@@ -102,8 +109,7 @@ const ProgressIndicator = styled.div<{ isActive: boolean }>`
|
|
|
102
109
|
isActive ? uiColors.orange : uiColors.lightGray};
|
|
103
110
|
margin: 0 5px;
|
|
104
111
|
transition: background-color 0.3s;
|
|
105
|
-
|
|
106
112
|
opacity: ${({ isActive }) => (isActive ? 1 : 0.25)};
|
|
107
|
-
|
|
108
113
|
border: 1px solid ${uiColors.raisinBlack};
|
|
114
|
+
cursor: pointer;
|
|
109
115
|
`;
|