l-min-components 1.7.1558 → 1.7.1559
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/package.json
CHANGED
|
@@ -73,6 +73,13 @@ const ReportQuestions = ({
|
|
|
73
73
|
onSwitchQuestion,
|
|
74
74
|
loading,
|
|
75
75
|
mainTitle,
|
|
76
|
+
navControl = {
|
|
77
|
+
on: false,
|
|
78
|
+
disablePrev: false,
|
|
79
|
+
disableNext: false,
|
|
80
|
+
onNext: () => {},
|
|
81
|
+
onPrev: () => {},
|
|
82
|
+
},
|
|
76
83
|
}) => {
|
|
77
84
|
const { findText } = useTranslation(wordStore);
|
|
78
85
|
const [questionList, setQuestionList] = useState([]);
|
|
@@ -253,14 +260,39 @@ const ReportQuestions = ({
|
|
|
253
260
|
<InfoIcon2 />
|
|
254
261
|
</ScoreHeader>
|
|
255
262
|
<QuestionNav>
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
263
|
+
<>
|
|
264
|
+
{navControl?.on ? (
|
|
265
|
+
<>
|
|
266
|
+
{" "}
|
|
267
|
+
<button
|
|
268
|
+
disabled={navControl.disablePrev}
|
|
269
|
+
onClick={navControl.onPrev}
|
|
270
|
+
>
|
|
271
|
+
<NavBack disabled={navControl.disablePrev} />
|
|
272
|
+
{findText("Previous question")}
|
|
273
|
+
</button>
|
|
274
|
+
<button
|
|
275
|
+
disabled={navControl.disableNext}
|
|
276
|
+
onClick={navControl.onNext}
|
|
277
|
+
>
|
|
278
|
+
{findText("Next question")}
|
|
279
|
+
<NavForword disabled={navControl.disableNext} />
|
|
280
|
+
</button>{" "}
|
|
281
|
+
</>
|
|
282
|
+
) : (
|
|
283
|
+
<>
|
|
284
|
+
{" "}
|
|
285
|
+
<button disabled={!prevId} onClick={handlePrev}>
|
|
286
|
+
<NavBack disabled={!prevId} />
|
|
287
|
+
{findText("Previous question")}
|
|
288
|
+
</button>
|
|
289
|
+
<button disabled={!nextId} onClick={handleNext}>
|
|
290
|
+
{findText("Next question")}
|
|
291
|
+
<NavForword disabled={!nextId} />
|
|
292
|
+
</button>
|
|
293
|
+
</>
|
|
294
|
+
)}
|
|
295
|
+
</>
|
|
264
296
|
</QuestionNav>
|
|
265
297
|
</ScoreHeaderContainer>
|
|
266
298
|
{/* {data && !hasAnswer && <ErrorHeader />} */}
|