Skip to content

Commit

Permalink
feat: added field for testimonial in both form and fs doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Srish-ty committed Apr 10, 2024
1 parent c798e96 commit 86a377f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 13 additions & 1 deletion src/components/form/FormContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState, useContext } from 'react';
import { AuthContext } from '../../context/AuthContext';
import './formInputs.css';
import { Heading, Paragraph } from '../shared';
import { DropDown, Inputs } from '../shared/partials/FormInputs';
import { DropDown, Inputs, TextAreaInput } from '../shared/partials/FormInputs';
import formimg from '../../assets/images/form-tickets.png';
import { donation, feeCoverage, initialContent, inputContent, lastPartContent } from '../../data/formInformation';
import { storeFormData } from '../../firebase/registration';
Expand Down Expand Up @@ -77,6 +77,7 @@ const FormContainer = () => {
mobile: userData?.mobile || '',
regType: userData?.regType || '',
profileImage: userData?.profileImage || '',
testimonial: userData?.testimonial || '',
googlName: currentUser?.name || '',
googleMail: currentUser?.email || '',
});
Expand Down Expand Up @@ -224,6 +225,17 @@ const FormContainer = () => {
Registration Type
</Paragraph>{' '}
<DropDown options={registrationOptions} key='regType' onChange={e => setInputValue('regType', e.target.value)} />
<Paragraph
variant='body2'
className=' shadow-white px-2'
style={{
textShadow: ' 1px 1px 0px #FF7342',
WebkitTextStrokeWidth: 0.5,
WebkitTextStrokeColor: '#252525',
}}>
Testimonial
</Paragraph>
<TextAreaInput onChange={e => setInputValue('testimonial', e.target.value)} />
<Paragraph variant='body3' className='mb-6 mt-10 text-xl'>
{lastPartContent}
</Paragraph>
Expand Down
6 changes: 3 additions & 3 deletions src/components/shared/partials/FormInputs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function Inputs({ className, formData, onChange, validated, checkEmpty, e
maxLength={maxLength}
id={id}
className={
'border divide-solid border-[#FF7647] outline-none bg-inherit rounded-md my-1 mb-5 text-[#B0B0B0] p-2 ' + className
'border divide-solid border-[#FF7647] outline-none bg-inherit rounded-md my-1 mb-6 text-[#B0B0B0] p-2 ' + className
}
style={{ boxShadow: '2px 2px 0px 0px #F9F9F9' }}
placeholder={placeholder}
Expand All @@ -57,15 +57,15 @@ export const TextAreaInput = () => {
<textarea
className='border divide-solid border-[#FF7647] outline-none bg-inherit rounded-md my-3 mb-5 w-[98%] h-[8vw] text-[#B0B0B0] p-2 block'
style={{ boxShadow: '2px 2px 0px 0px #F9F9F9' }}
placeholder='Registration Type'
placeholder='Share your Experience of coming :-)'
/>
);
};

export const DropDown = ({ options, onChange }) => {
return (
<select
className='outline-none bg-inherit rounded-md my-1 mb-5 text-[#B0B0B0] p-2 w-[98%]'
className='outline-none bg-inherit rounded-md my-1 mb-6 text-[#B0B0B0] p-2 w-[98%]'
style={{ border: '1px solid #FF7647', boxShadow: '2px 2px 0px 0px #F9F9F9' }}
onChange={onChange}>
{options.map(option => (
Expand Down

0 comments on commit 86a377f

Please sign in to comment.