From 5fa4eb2f84c95439cebcc91483715e7a1af7d4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Cie=C5=9Blak?= Date: Mon, 2 Dec 2024 12:36:01 +0100 Subject: [PATCH 01/97] Improve ButtonWithMenu types, add tests for Button types (#49585) * Add tests for button types * Improve ButtonWithMenu types --- .../design/src/Button/Button.test.tsx | 139 +++++++++++++++++- .../src/ButtonWithMenu/ButtonWithMenu.tsx | 25 +++- 2 files changed, 153 insertions(+), 11 deletions(-) diff --git a/web/packages/design/src/Button/Button.test.tsx b/web/packages/design/src/Button/Button.test.tsx index 5310cb9c02151..8f4528e102baf 100644 --- a/web/packages/design/src/Button/Button.test.tsx +++ b/web/packages/design/src/Button/Button.test.tsx @@ -16,11 +16,21 @@ * along with this program. If not, see . */ -import React from 'react'; +import React, { + ComponentPropsWithoutRef, + ComponentPropsWithRef, + PropsWithChildren, +} from 'react'; -import { render, theme } from 'design/utils/testing'; +import { render, theme, screen } from 'design/utils/testing'; -import { Button, ButtonPrimary, ButtonSecondary, ButtonWarning } from './index'; +import { + Button, + ButtonPrimary, + ButtonSecondary, + ButtonWarning, + ButtonSize, +} from './index'; describe('design/Button', () => { it('renders a