mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
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.
This commit is contained in:
parent
d8790903cc
commit
673ef660e0
@ -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<typeof Input> = {
|
||||
title: 'Components/Primitives/Input',
|
||||
component: Input,
|
||||
|
||||
@ -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<typeof Switch> = {
|
||||
title: 'Components/Primitives/Switch',
|
||||
component: Switch,
|
||||
@ -158,6 +157,7 @@ export const Controlled: Story = {
|
||||
</div>
|
||||
<div className="text-sm text-muted-foreground">Current state: {checked ? 'On' : 'Off'}</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setChecked(!checked)}
|
||||
className="w-fit rounded-md bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90">
|
||||
Toggle State
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { Button, Flex, RowFlex, Switch, Tooltip, WarnTooltip } from '@cherrystudio/ui'
|
||||
import { HelpTooltip } from '@cherrystudio/ui'
|
||||
import { adaptProvider } from '@renderer/aiCore/provider/providerConfig'
|
||||
import OpenAIAlert from '@renderer/components/Alert/OpenAIAlert'
|
||||
import { LoadingIcon } from '@renderer/components/Icons'
|
||||
import { ApiKeyListPopup } from '@renderer/components/Popups/ApiKeyListPopup'
|
||||
import Selector from '@renderer/components/Selector'
|
||||
import { HelpTooltip } from '@renderer/components/TooltipIcons'
|
||||
import { isEmbeddingModel, isRerankModel } from '@renderer/config/models'
|
||||
import { PROVIDER_URLS } from '@renderer/config/providers'
|
||||
import { useTheme } from '@renderer/context/ThemeProvider'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user