UNPKG

we-insights-react

Version:

[we-insights] is a powerful utility library designed to streamline data collection processes for WeApp employees. It simplifies the process of gathering, storing, and managing data within WeApp projects, making it an invaluable tool for enhancing efficien

114 lines (109 loc) 3.64 kB
import { SVGReactComponent as notNice } from '../images/notNice.svg' import { SVGReactComponent as notNiceSelected } from "../images/notNiceSelected.svg" import { SVGReactComponent as okay } from '../images/okay.svg' import { SVGReactComponent as okaySelected } from "../images/okaySelected.svg" import { SVGReactComponent as good } from '../images/good.svg' import { SVGReactComponent as goodSelected } from "../images/goodSelected.svg" import { SVGReactComponent as superb } from '../images/super.svg' import { SVGReactComponent as superbSelected } from "../images/superSelected.svg" import { DefaultTranslations, Style } from '../../interfaces' export interface RatingIcon { Icon: React.ComponentType<React.SVGProps<SVGSVGElement>>; IconSelected: React.ComponentType<React.SVGProps<SVGSVGElement>>; } export const ratingIcons: RatingIcon[] = [ { Icon: notNice, IconSelected: notNiceSelected }, { Icon: okay, IconSelected: okaySelected }, { Icon: good, IconSelected: goodSelected }, { Icon: superb, IconSelected: superbSelected }, { Icon: superb, IconSelected: superbSelected } ] export const defaultTranslations: DefaultTranslations = { en: { title: 'We value your feedback', description: 'Help us improve your experience!', feedbackQuestion: 'What do you like most about {projectName}? Is there anything you feel is missing or could be improved?', feedbackPlaceholder: 'Your Feedback', emailPlaceholder: 'Email Address', sendButton: 'Send', skipButton: 'Skip', satisfactionQuestion: 'How satisfied are you with ', answerFurtherQuestions: 'I will gladly answer further questions through email', emailError: 'Please enter a valid email address', ratingTranslations: { one: 'Not Satisfied at all', two: 'Not very Satisfied', three: 'Neutral', four: 'Satisfied', five: 'Very Satisfied', }, }, sv: { title: 'Vi värdesätter din feedback', description: 'Hjälp oss göra din upplevelse bättre!', feedbackQuestion: 'Vad gillar du mest med {projectName}? Är det något du tycker saknas eller hade kunnat förbättras?', feedbackPlaceholder: 'Feedback', emailPlaceholder: 'Email', sendButton: 'Skicka', skipButton: 'Skippa', satisfactionQuestion: 'Hur nöjd är du med ', answerFurtherQuestions: 'Jag svarar gärna på fler frågor via email.', emailError: 'Vänligen ange en giltig emailadress', ratingTranslations: { one: 'Inte alls Nöjd', two: 'Inte så Nöjd', three: 'Neutral', four: 'Nöjd', five: 'Väldigt Nöjd', }, }, } export const defaultStyle: Style = { backgroundColor: '#212431', textColor: '#ffffff', primaryFont: 'Arial', secondaryFont: 'Arial', validationErrorColor: '#cc0000', buttonsStyle: { primaryButtonBackgroundColor: '#FDA783', primaryButtonTextColor: '#2D3142', secondaryButtonBackgroundColor: '#212431', secondaryButtonTextColor: '#ffffff', }, inputStyle: { backgroundColor: '#2D3142', textColor: '#ffffff', borderColor: '#414762', }, checkboxStyle: { checkedBorderColor: '#FDA783', uncheckedBorderColor: '#414762', checkedBackgroundColor: '#FDA783', uncheckedBackgroundColor: '#2D3142', checkmarkColor: '#2D3142', textColor: '#ffffff', }, ratingBoxStyle: { backgroundColor: '#CDD0DC', textColor: '#000000', iconTextColor: '#2D3142', fontFamily: 'Arial', }, }