@@ -54,16 +54,7 @@ export function InputPrompt(/* props: InputPromptProps */): JSX.Element {
54
54
55
55
return (
56
56
< StyledForm id = "User_Prompt" onSubmit = { ( ) => handleSubmit ( onSubmit ) } >
57
- < Flex
58
- padding = { SPACING . spacing40 }
59
- gridGap = { SPACING . spacing40 }
60
- flexDirection = { DIRECTION_ROW }
61
- backgroundColor = { COLORS . white }
62
- borderRadius = { BORDERS . borderRadius4 }
63
- justifyContent = { JUSTIFY_CENTER }
64
- alignItems = { ALIGN_CENTER }
65
- maxHeight = "21.25rem"
66
- >
57
+ < Flex css = { CONTAINER_STYLE } >
67
58
< StyledTextarea
68
59
rows = { calcTextAreaHeight ( ) }
69
60
placeholder = { t ( 'type_your_prompt' ) }
@@ -79,6 +70,21 @@ const StyledForm = styled.form`
79
70
width : 100% ;
80
71
`
81
72
73
+ const CONTAINER_STYLE = css `
74
+ padding : ${ SPACING . spacing40 } ;
75
+ grid-gap : ${ SPACING . spacing40 } ;
76
+ flex-direction : ${ DIRECTION_ROW } ;
77
+ background-color : ${ COLORS . white } ;
78
+ border-radius : ${ BORDERS . borderRadius4 } ;
79
+ justify-content : ${ JUSTIFY_CENTER } ;
80
+ align-items : ${ ALIGN_CENTER } ;
81
+ max-height : 21.25rem ;
82
+
83
+ & : focus-within {
84
+ border : 1px ${ BORDERS . styleSolid } ${ COLORS . blue50 } ;
85
+ }
86
+ `
87
+
82
88
const StyledTextarea = styled . textarea `
83
89
resize : none;
84
90
min-height : 3.75rem ;
@@ -93,6 +99,7 @@ const StyledTextarea = styled.textarea`
93
99
width : 100% ;
94
100
font-size : ${ TYPOGRAPHY . fontSize20 } ;
95
101
line-height : ${ TYPOGRAPHY . lineHeight24 } ;
102
+
96
103
::placeholder {
97
104
position : absolute;
98
105
top : 50% ;
0 commit comments