From e402ed17b1833334c54440fdfab709af87f18c8e Mon Sep 17 00:00:00 2001 From: Ali Amori Kadhim Date: Fri, 12 Aug 2022 16:45:39 +0200 Subject: [PATCH] fix: react radio button remove pseudo properties --- .../src/RadioButton.test.tsx | 24 ------------------- .../src/RadioButton.tsx | 10 +------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/packages/component-library-react/src/RadioButton.test.tsx b/packages/component-library-react/src/RadioButton.test.tsx index def5947446..58097bf039 100644 --- a/packages/component-library-react/src/RadioButton.test.tsx +++ b/packages/component-library-react/src/RadioButton.test.tsx @@ -38,14 +38,6 @@ describe('RadioButton', () => { }); describe('checked variant', () => { - it('renders a design system BEM modifier class name', () => { - const { container } = render(); - - const radioButton = container.querySelector(':only-child'); - - expect(radioButton).toHaveClass('utrecht-radio-button--checked'); - }); - it('is not checked by default', () => { const { container } = render(); @@ -154,14 +146,6 @@ describe('RadioButton', () => { expect(radioButton).not.toBeDisabled(); }); - it('renders a design system BEM modifier class name', () => { - const { container } = render(); - - const radioButton = container.querySelector(':only-child'); - - expect(radioButton).toHaveClass('utrecht-radio-button--disabled'); - }); - it('omits non-essential disabled attributes when not disabled', () => { const { container } = render(); @@ -198,14 +182,6 @@ describe('RadioButton', () => { expect(radioButton).not.toBeRequired(); }); - it('renders a design system BEM modifier class name', () => { - const { container } = render(); - - const radioButton = container.querySelector(':only-child'); - - expect(radioButton).toHaveClass('utrecht-radio-button--required'); - }); - it('omits non-essential required attributes when not required', () => { const { container } = render(); diff --git a/packages/component-library-react/src/RadioButton.tsx b/packages/component-library-react/src/RadioButton.tsx index 5162e86629..148122d83a 100644 --- a/packages/component-library-react/src/RadioButton.tsx +++ b/packages/component-library-react/src/RadioButton.tsx @@ -6,10 +6,7 @@ export interface RadioButtonProps extends Omit, - ) => ( + ({ invalid, className, ...restProps }: RadioButtonProps, ref: ForwardedRef) => ( ), );