From 673ef660e002924464c3584f3df2ad13803e54f1 Mon Sep 17 00:00:00 2001 From: MyPrototypeWhat Date: Tue, 2 Dec 2025 10:50:14 +0800 Subject: [PATCH] refactor(stories): update imports in Input and Switch stories - Replace local imports of Input and Switch components with imports from the @cherrystudio/ui package for consistency. - Minor adjustment to the Switch story to include a button type for the toggle state functionality. --- packages/ui/stories/components/primitives/Input.stories.tsx | 3 +-- packages/ui/stories/components/primitives/Switch.stories.tsx | 4 ++-- .../src/pages/settings/ProviderSettings/ProviderSetting.tsx | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/ui/stories/components/primitives/Input.stories.tsx b/packages/ui/stories/components/primitives/Input.stories.tsx index 98605486b8..12316faa5a 100644 --- a/packages/ui/stories/components/primitives/Input.stories.tsx +++ b/packages/ui/stories/components/primitives/Input.stories.tsx @@ -1,9 +1,8 @@ +import { Input } from '@cherrystudio/ui' import type { Meta, StoryObj } from '@storybook/react' import { Mail, Search, User } from 'lucide-react' import { useState } from 'react' -import { Input } from '../../../src/components/primitives/input' - const meta: Meta = { title: 'Components/Primitives/Input', component: Input, diff --git a/packages/ui/stories/components/primitives/Switch.stories.tsx b/packages/ui/stories/components/primitives/Switch.stories.tsx index 958701496c..86866ccb1f 100644 --- a/packages/ui/stories/components/primitives/Switch.stories.tsx +++ b/packages/ui/stories/components/primitives/Switch.stories.tsx @@ -1,9 +1,8 @@ +import { DescriptionSwitch, Switch } from '@cherrystudio/ui' import type { Meta, StoryObj } from '@storybook/react' import { Bell, Moon, Shield, Wifi, Zap } from 'lucide-react' import { useState } from 'react' -import { DescriptionSwitch, Switch } from '../../../src/components/primitives/switch' - const meta: Meta = { title: 'Components/Primitives/Switch', component: Switch, @@ -158,6 +157,7 @@ export const Controlled: Story = {
Current state: {checked ? 'On' : 'Off'}