From bfe187df56c0bc9419a27ff0c1945f5418b23758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Curda?= Date: Thu, 2 Jan 2025 12:51:34 +0100 Subject: [PATCH] fixup! Feat(web-react): Introduce Box component #DS-1595 --- .../src/components/Box/__tests__/useBoxStyleProps.test.ts | 2 ++ .../web-react/src/components/Box/stories/Box.stories.tsx | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/web-react/src/components/Box/__tests__/useBoxStyleProps.test.ts b/packages/web-react/src/components/Box/__tests__/useBoxStyleProps.test.ts index 14c87a0186..cf64e4815a 100644 --- a/packages/web-react/src/components/Box/__tests__/useBoxStyleProps.test.ts +++ b/packages/web-react/src/components/Box/__tests__/useBoxStyleProps.test.ts @@ -95,6 +95,7 @@ describe('useBoxStyleProps', () => { const props: SpiritBoxProps = { borderRadius: '200', borderWidth: '100', + borderStyle: 'solid', }; const { result } = renderHook(() => useBoxStyleProps(props)); @@ -114,6 +115,7 @@ describe('useBoxStyleProps', () => { const props: SpiritBoxProps = { borderColor: 'basic', borderWidth: '100', + borderStyle: 'solid', }; const { result } = renderHook(() => useBoxStyleProps(props)); diff --git a/packages/web-react/src/components/Box/stories/Box.stories.tsx b/packages/web-react/src/components/Box/stories/Box.stories.tsx index dbf11a0b91..e5200636ee 100644 --- a/packages/web-react/src/components/Box/stories/Box.stories.tsx +++ b/packages/web-react/src/components/Box/stories/Box.stories.tsx @@ -1,9 +1,9 @@ import { Markdown } from '@storybook/blocks'; import type { Meta, StoryObj } from '@storybook/react'; import React from 'react'; +import { BackgroundColors, BorderColors, BorderRadii, BorderStyles, BorderWidths } from '../../../constants'; import Box from '../Box'; import ReadMe from '../README.md'; -import { BorderColors, BorderRadii, BorderStyles, BorderWidths } from '../../../constants'; const meta: Meta = { title: 'Components/Box', @@ -115,7 +115,8 @@ const meta: Meta = { }, }, backgroundColor: { - control: 'text', + control: 'select', + options: Object.values(BackgroundColors), table: { type: { summary: 'BackgroundColorsDictionaryType',