Skip to content

Commit 6e24b48

Browse files
committed
chore: fix eslint issue
1 parent 52101ff commit 6e24b48

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed

packages-runtime/ui/stories/core/Button.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const Appearances: Story = {
170170
// 所有尺寸
171171
export const Sizes: Story = {
172172
render: () => (
173-
<div className="flex items-center flex-wrap gap-4">
173+
<div className="flex flex-wrap items-center gap-4">
174174
<Button size="sm">Small</Button>
175175
<Button size="md">Medium</Button>
176176
<Button size="icon">🔍</Button>

packages-runtime/ui/stories/core/Input.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const Controlled: Story = {
7979
return (
8080
<div className="space-y-2">
8181
<Input value={value} onChange={e => setValue(e.target.value)} placeholder="受控输入" />
82-
<p className="text-sm text-gray-600">
82+
<p className="text-gray-600 text-sm">
8383
当前值:
8484
{' '}
8585
{value}

packages-runtime/ui/stories/core/Switch.stories.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@ interface SwitchProps {
1212
}
1313

1414
const Switch: React.FC<SwitchProps> = ({ checked = false, disabled = false }) => (
15-
<label className="inline-flex items-center cursor-pointer">
16-
<input type="checkbox" className="sr-only peer" checked={checked} disabled={disabled} />
17-
<div className="relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" />
15+
<label className="inline-flex cursor-pointer items-center">
16+
<input type="checkbox" className="peer sr-only" checked={checked} disabled={disabled} />
17+
<div className={`
18+
w-11 bg-gray-200 peer relative h-6 rounded-full
19+
peer-focus:ring-blue-300 peer-focus:ring-4 peer-focus:outline-none
20+
peer-checked:after:border-white peer-checked:after:translate-x-full
21+
after:bg-white after:border-gray-300 after:absolute after:top-[2px]
22+
after:left-[2px] after:h-5 after:w-5 after:rounded-full after:border
23+
after:transition-all after:content-['']
24+
peer-checked:bg-blue-600
25+
`}
26+
/>
1827
</label>
1928
)
2029

packages-runtime/ui/stories/feedback/Loading.stories.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import React from 'react'
77

88
const Loading: React.FC = () => (
99
<div className="flex items-center justify-center">
10-
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600" />
10+
<div className={`
11+
animate-spin border-blue-600 h-8 w-8 rounded-full border-b-2
12+
`}
13+
/>
1114
</div>
1215
)
1316

packages-runtime/ui/stories/navigation/Tabs.stories.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ const Tabs: React.FC<TabsProps> = ({ tabs, activeTab = 0 }) => (
1616
<button
1717
key={tab}
1818
type="button"
19-
className={`px-4 py-2 ${index === activeTab ? 'border-b-2 border-blue-600 text-blue-600' : 'text-gray-600'}`}
19+
className={`
20+
px-4 py-2
21+
${index === activeTab
22+
? 'border-blue-600 text-blue-600 border-b-2'
23+
: `text-gray-600`}
24+
`}
2025
>
2126
{tab}
2227
</button>

0 commit comments

Comments
 (0)