Skip to content

Commit 77e7ab7

Browse files
authored
fix(Field): pass qa prop (#498)
1 parent e8837a7 commit 77e7ab7

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

.changeset/proud-emus-speak.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Pass `qa` prop for fields.

src/components/forms/FieldWrapper/FieldWrapper.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export const FieldWrapper = forwardRef(function FieldWrapper(
7777
) {
7878
const {
7979
as,
80+
qa,
8081
labelPosition = 'top',
8182
label,
8283
extra,
@@ -157,6 +158,7 @@ export const FieldWrapper = forwardRef(function FieldWrapper(
157158
<>
158159
<FieldElement
159160
ref={ref}
161+
qa={qa}
160162
as={as ?? 'div'}
161163
mods={mods}
162164
isHidden={isHidden}

src/components/forms/FieldWrapper/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { Props, Styles } from '../../../tasty';
1010
// ADDING NEW PROPS TO THIS INTERFACE REQUIRES ADDING THEM TO createFieldWrapperPropsKeys FUNCTION
1111

1212
export type CubeFieldWrapperProps = {
13+
qa?: string;
1314
as?: string;
1415
validationState?: ValidationState;
1516
styles?: Styles;

src/components/forms/wrapper.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export function wrapWithField<T extends WrapWithFieldProps>(
1515
props: T,
1616
) {
1717
let {
18+
qa,
1819
label,
1920
extra,
2021
labelPosition = 'top',
@@ -38,6 +39,7 @@ export function wrapWithField<T extends WrapWithFieldProps>(
3839
return (
3940
<FieldWrapper
4041
{...{
42+
qa,
4143
labelPosition,
4244
label,
4345
extra,

0 commit comments

Comments
 (0)