File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed
src/design-system/text-box Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,35 @@ export const TextBox = ({
6464 onChange = { onChange }
6565 id = { id }
6666 maxLength = { maxLength }
67- data-testid = { rest [ 'data-testid' ] }
67+ data-testid = {
68+ rest [ 'data-testid' ]
69+ ? `${ rest [ 'data-testid' ] } -input`
70+ : 'text-box-input'
71+ }
6872 />
6973 </ Form . Control >
70- < Form . Label className = { cn ( cx . label ) } > { label } </ Form . Label >
74+ < Form . Label
75+ className = { cn ( cx . label ) }
76+ data-testid = {
77+ rest [ 'data-testid' ]
78+ ? `${ rest [ 'data-testid' ] } -label`
79+ : 'text-box-label'
80+ }
81+ >
82+ { label }
83+ </ Form . Label >
7184 </ Form . Field >
7285 </ Flex >
7386 { errorMessage && (
74- < Text . Label color = "error" className = { cx . errorMessage } >
87+ < Text . Label
88+ color = "error"
89+ className = { cx . errorMessage }
90+ data-testid = {
91+ rest [ 'data-testid' ]
92+ ? `${ rest [ 'data-testid' ] } -error`
93+ : 'text-box-error'
94+ }
95+ >
7596 { errorMessage }
7697 </ Text . Label >
7798 ) }
You can’t perform that action at this time.
0 commit comments