Skip to content

Commit

Permalink
KDS-1841-fix-data-testid-in-radio-group (#4185)
Browse files Browse the repository at this point in the history
* fixed camel case on RadioGroup data-testId

* add changeset

* fixup! fixed camel case on RadioGroup data-testId

---------

Co-authored-by: Cassandra <[email protected]>
  • Loading branch information
gyfchong and HeartSquared authored Oct 23, 2023
1 parent 8c7a671 commit f4f6005
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-numbers-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/components": patch
---

fixed camel case on RadioGroup `data-testId`
8 changes: 4 additions & 4 deletions packages/components/src/Radio/RadioGroup/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type RadioGroupProps = OverrideClassName<
labelId?: string
noBottomMargin?: boolean
reversed?: boolean
"data-testId"?: string
"data-testid"?: string
}

export const RadioGroup = ({
Expand All @@ -22,14 +22,14 @@ export const RadioGroup = ({
noBottomMargin = false,
reversed = false,
classNameOverride,
"data-testId": dataTestId,
"data-testid": dataTestId,
...restProps
}: RadioGroupProps): JSX.Element => {
const labelId = propsLabelId ?? useId()

return (
<div
data-testId={dataTestId}
data-testid={dataTestId}
className={classnames(
styles.radioGroupContainer,
classNameOverride,
Expand All @@ -43,7 +43,7 @@ export const RadioGroup = ({
<div className={styles.radioGroupLabel}>
<Label
id={labelId}
data-testId={dataTestId && `${dataTestId}-field-label`}
data-testid={dataTestId && `${dataTestId}-field-label`}
labelText={labelText}
labelType="text"
reversed={reversed}
Expand Down

0 comments on commit f4f6005

Please sign in to comment.