Skip to content

Commit

Permalink
Merge commit 'a30f2e96c74df409201f59231b1c02b48e04b36b'
Browse files Browse the repository at this point in the history
  • Loading branch information
anadis504 committed May 27, 2024
2 parents 45ccbcb + a30f2e9 commit 48df889
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/components/SharedMisc/AdvancedDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const AdvancedDropdown: React.FC<React.PropsWithChildren<Props>> = ({
maxMenuHeight={400}
className={css`
aria-label: breed-selection;
width: 99%;
`}
/>
//</div>
Expand Down
15 changes: 10 additions & 5 deletions src/components/Survey/SurveyExerciseItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { css } from "@emotion/css"
import styled from "@emotion/styled"

import TextAreaField from "../../shared-module/components/InputFields/TextAreaField"
import TextField from "../../shared-module/components/InputFields/TextField"
import { AnswerType, SurveyItem } from "../../util/spec-types/privateSpec"
import MarkdownText from "../MarkdownText"
import AdvancedDropdown from "../SharedMisc/AdvancedDropdown"
Expand Down Expand Up @@ -50,7 +52,7 @@ const SurveyExerciseitem: React.FC<React.PropsWithChildren<Props>> = ({
case AnswerType.Number: {
return (
<div>
<input
<TextField
aria-label={`number-input-for-${item.question.questionLabel}`}
value={answer ?? ""}
type="number"
Expand All @@ -62,6 +64,7 @@ const SurveyExerciseitem: React.FC<React.PropsWithChildren<Props>> = ({
className={css`
border: 1px solid #e0e0e0;
border-radius: 2px;
max-width: 10em;
`}
/>
</div>
Expand All @@ -70,18 +73,20 @@ const SurveyExerciseitem: React.FC<React.PropsWithChildren<Props>> = ({
case AnswerType.Text: {
return (
<div>
<input
<TextAreaField
aria-label={`text-input-for-${item.question.questionLabel}`}
value={answer ?? ""}
type="text"
autoResize
onChange={(e) => {
updateAnswer(item.id, e.target.value)
}}
required
disabled={disabled}
className={css`
border: 1px solid #e0e0e0;
border-radius: 2px;
textarea {
width: 99%;
max-height: 200px;
}
`}
/>
</div>
Expand Down

0 comments on commit 48df889

Please sign in to comment.