diff options
Diffstat (limited to 'src/components/atoms/forms/fields/radio')
| -rw-r--r-- | src/components/atoms/forms/fields/radio/radio.test.tsx | 6 | ||||
| -rw-r--r-- | src/components/atoms/forms/fields/radio/radio.tsx | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/components/atoms/forms/fields/radio/radio.test.tsx b/src/components/atoms/forms/fields/radio/radio.test.tsx index ba8d68f..55eda9d 100644 --- a/src/components/atoms/forms/fields/radio/radio.test.tsx +++ b/src/components/atoms/forms/fields/radio/radio.test.tsx @@ -1,5 +1,5 @@ import { describe, expect, it } from '@jest/globals'; -import { render, screen } from '../../../../../../tests/utils'; +import { render, screen as rtlScreen } from '@testing-library/react'; import { Radio } from './radio'; const doNothing = () => { @@ -11,7 +11,7 @@ describe('Radio', () => { render( <Radio id="radio" name="radio" onChange={doNothing} value="radio" /> ); - expect(screen.getByRole('radio')).not.toBeChecked(); + expect(rtlScreen.getByRole('radio')).not.toBeChecked(); }); it('renders a checked radio', () => { @@ -24,6 +24,6 @@ describe('Radio', () => { value="radio" /> ); - expect(screen.getByRole('radio')).toBeChecked(); + expect(rtlScreen.getByRole('radio')).toBeChecked(); }); }); diff --git a/src/components/atoms/forms/fields/radio/radio.tsx b/src/components/atoms/forms/fields/radio/radio.tsx index 6430b4a..5a518c7 100644 --- a/src/components/atoms/forms/fields/radio/radio.tsx +++ b/src/components/atoms/forms/fields/radio/radio.tsx @@ -1,5 +1,5 @@ -import { FC } from 'react'; -import { BooleanField, BooleanFieldProps } from '../boolean-field'; +import type { FC } from 'react'; +import { BooleanField, type BooleanFieldProps } from '../boolean-field'; export type RadioProps = Omit<BooleanFieldProps, 'type'>; @@ -9,5 +9,6 @@ export type RadioProps = Omit<BooleanFieldProps, 'type'>; * Render a radio input type. */ export const Radio: FC<RadioProps> = (props) => ( + // eslint-disable-next-line react/jsx-no-literals -- Type allowed <BooleanField {...props} type="radio" /> ); |
