@@ -6,11 +6,9 @@ import { ErrorPopup, QuickFormContainer } from "../components";
6
6
import { QuickFormTokens , defineQuickFormTokens } from "../style/quickFormTokensDefinition" ;
7
7
import { QuickFormDefinition } from "../model" ;
8
8
import { resolveQuickFormService } from "../services/QuickFormServices" ;
9
- import { kbaQuickFormTokens } from "../style/kbaQuickFormTokens" ;
10
9
import { isFirstQInCurrentSlide } from "../utils/isFirstQuestionInSlide" ;
11
10
12
11
type QuickFormProviderProps = {
13
- className ?: string ,
14
12
children : React . ReactNode ;
15
13
definition : QuickFormDefinition ;
16
14
tokens ?: Partial < QuickFormTokens > ;
@@ -21,7 +19,6 @@ type QuickFormProviderProps = {
21
19
22
20
export const QuickFormProvider : React . FC < QuickFormProviderProps > = (
23
21
{
24
- className,
25
22
children,
26
23
definition,
27
24
payload,
@@ -34,7 +31,7 @@ export const QuickFormProvider: React.FC<QuickFormProviderProps> = (
34
31
const logger = resolveQuickFormService ( "logger" ) ;
35
32
const cssVariables = defineQuickFormTokens ( tokens ?? { } , definition ?. layout ?. tokens ?? { } ) ;
36
33
37
-
34
+
38
35
logger . log ( "cssVariables" , cssVariables ) ;
39
36
const transform = resolveQuickFormService ( "modeltransformer" ) ;
40
37
const defaultStateObj = useMemo ( ( ) => { return defaultState ( transform ( definition , payload ) , definition . layout ) } , [ ] ) ;
@@ -56,20 +53,22 @@ export const QuickFormProvider: React.FC<QuickFormProviderProps> = (
56
53
const getCurrentSlide = ( ) => ( state . slides [ state . currIdx ] ) ;
57
54
58
55
return (
59
- < QuickFormContext . Provider value = { {
60
- state,
61
- dispatch,
62
- goToSlide,
63
- goToNextSlide,
64
- goToPrevSlide,
65
- answerQuestion,
66
- setIntroVisited,
67
- setErrorMsg,
68
- isFirstQuestionInCurrentSlide,
69
- getCurrentSlide,
70
- onSubmitAsync,
71
- cssVariables
72
- } } >
56
+ < QuickFormContext . Provider
57
+ value = { {
58
+ state,
59
+ dispatch,
60
+ goToSlide,
61
+ goToNextSlide,
62
+ goToPrevSlide,
63
+ answerQuestion,
64
+ setIntroVisited,
65
+ setErrorMsg,
66
+ isFirstQuestionInCurrentSlide,
67
+ getCurrentSlide,
68
+ onSubmitAsync,
69
+ cssVariables
70
+ } }
71
+ >
73
72
74
73
{ asContainer ? (
75
74
< QuickFormContainer style = { cssVariables } >
0 commit comments