Skip to content

Commit 4c68d3d

Browse files
committed
fix: removed unused classname in quickformprovider - cant pass classname to provider anyway so did not make sense to have it
1 parent 8b1f8b9 commit 4c68d3d

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

packages/core/src/state/QuickformProvider.tsx

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import { ErrorPopup, QuickFormContainer } from "../components";
66
import { QuickFormTokens, defineQuickFormTokens } from "../style/quickFormTokensDefinition";
77
import { QuickFormDefinition } from "../model";
88
import { resolveQuickFormService } from "../services/QuickFormServices";
9-
import { kbaQuickFormTokens } from "../style/kbaQuickFormTokens";
109
import { isFirstQInCurrentSlide } from "../utils/isFirstQuestionInSlide";
1110

1211
type QuickFormProviderProps = {
13-
className?: string,
1412
children: React.ReactNode;
1513
definition: QuickFormDefinition;
1614
tokens?: Partial<QuickFormTokens>;
@@ -21,7 +19,6 @@ type QuickFormProviderProps = {
2119

2220
export const QuickFormProvider: React.FC<QuickFormProviderProps> = (
2321
{
24-
className,
2522
children,
2623
definition,
2724
payload,
@@ -34,7 +31,7 @@ export const QuickFormProvider: React.FC<QuickFormProviderProps> = (
3431
const logger = resolveQuickFormService("logger");
3532
const cssVariables = defineQuickFormTokens(tokens ?? {}, definition?.layout?.tokens ?? {});
3633

37-
34+
3835
logger.log("cssVariables", cssVariables);
3936
const transform = resolveQuickFormService("modeltransformer");
4037
const defaultStateObj = useMemo(() => { return defaultState(transform(definition, payload), definition.layout) }, []);
@@ -56,20 +53,22 @@ export const QuickFormProvider: React.FC<QuickFormProviderProps> = (
5653
const getCurrentSlide = () => (state.slides[state.currIdx]);
5754

5855
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+
>
7372

7473
{asContainer ? (
7574
<QuickFormContainer style={cssVariables}>

0 commit comments

Comments
 (0)