Skip to content

Commit

Permalink
added lables for questionnaire.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
trbKnl committed Mar 7, 2024
1 parent d17b0b7 commit 9319cfa
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/framework/visualisation/react/ui/prompts/questionnaire.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { ReactFactoryContext } from '../../factory'
import { Weak } from '../../../../helpers'
import { LabelButton, PrimaryButton } from '../elements/button'
import TextBundle from '../../../../text_bundle'
import { PrimaryButton } from '../elements/button'
import { PropsUIPromptQuestionnaire } from '../../../../types/prompts'
import { Translator } from '../../../../translator'
import { isPropsUIQuestionMultipleChoice } from '../../../../types/elements'
Expand Down Expand Up @@ -74,20 +75,27 @@ export const Questionnaire = (props: Props): JSX.Element => {
{renderQuestions()}
</div>
<div className='flex flex-row gap-4 mt-4 mb-4'>
<PrimaryButton label="DONATE" onClick={handleDonate} color='bg-success text-white' />
<LabelButton label="CANCEL" onClick={handleCancel} color='text-grey1' />
<PrimaryButton label={copy.continueLabel} onClick={handleDonate} color='bg-success text-white' />
</div>
</div>
);


function prepareCopy (locale: string): Copy {
return {
description: Translator.translate(description, locale)
description: Translator.translate(description, locale),
continueLabel: Translator.translate(continueLabel, locale)
}
}
};


interface Copy {
description: string
continueLabel: string
}


const continueLabel = new TextBundle()
.add('en', 'Continue')
.add('nl', 'Verder')

0 comments on commit 9319cfa

Please sign in to comment.