frst-components 0.22.75 → 0.22.77
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/index.js
CHANGED
|
@@ -14092,7 +14092,7 @@ const ContentDescription = styled__default["default"].div `
|
|
|
14092
14092
|
gap: 16px;
|
|
14093
14093
|
`;
|
|
14094
14094
|
|
|
14095
|
-
const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps, Exit = 'X',
|
|
14095
|
+
const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps, Exit = 'X', onCurrentStep }) => {
|
|
14096
14096
|
const [numberCurrentStep, setNumberCurrentStep] = React.useState(0);
|
|
14097
14097
|
const [currentTopic, setCurrentTopic] = React.useState(steps[numberCurrentStep]);
|
|
14098
14098
|
const isLastStep = currentTopic === steps[steps.length - 1];
|
|
@@ -14101,14 +14101,16 @@ const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps,
|
|
|
14101
14101
|
React.useEffect(() => {
|
|
14102
14102
|
setCurrentTopic(steps[numberCurrentStep]);
|
|
14103
14103
|
}, [steps]);
|
|
14104
|
+
React.useEffect(() => {
|
|
14105
|
+
onCurrentStep && onCurrentStep(currentTopic);
|
|
14106
|
+
}, [currentTopic]);
|
|
14104
14107
|
const handleClickButtonNext = () => {
|
|
14105
|
-
if (isLastStep)
|
|
14106
|
-
onFinish();
|
|
14108
|
+
if (isLastStep) {
|
|
14109
|
+
onFinish && onFinish();
|
|
14110
|
+
}
|
|
14107
14111
|
else {
|
|
14108
14112
|
setCurrentTopic(steps[numberCurrentStep + 1]);
|
|
14109
14113
|
setNumberCurrentStep((prev) => prev + 1);
|
|
14110
|
-
if (onNext)
|
|
14111
|
-
onNext();
|
|
14112
14114
|
}
|
|
14113
14115
|
};
|
|
14114
14116
|
const handleClickTopic = (id) => {
|
|
@@ -12,10 +12,10 @@ type ModalNewFeaturesProps = {
|
|
|
12
12
|
open: boolean;
|
|
13
13
|
Exit?: string;
|
|
14
14
|
onClose: () => void;
|
|
15
|
-
onFinish
|
|
16
|
-
|
|
15
|
+
onFinish?: () => void;
|
|
16
|
+
onCurrentStep?: (CurrentStep: any) => void;
|
|
17
17
|
steps: TopicsNewFeatues[];
|
|
18
18
|
};
|
|
19
|
-
declare const modalNewFeatures: ({ title, open, onClose, onFinish, steps, Exit,
|
|
19
|
+
declare const modalNewFeatures: ({ title, open, onClose, onFinish, steps, Exit, onCurrentStep }: ModalNewFeaturesProps) => JSX.Element;
|
|
20
20
|
export default modalNewFeatures;
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/modalNewFeatures/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAC,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/modalNewFeatures/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,KAAK,CAAC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