캐릭터 목록에 OverlayScrollbars 적용
스크롤바가 레이아웃을 밀지 않도록 메인 바디와 동일한 오버레이 스크롤바 사용 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e0dd7d1bc4
commit
8e4c7b8c1b
1 changed files with 29 additions and 20 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useMutation } from '@tanstack/react-query'
|
import { useMutation } from '@tanstack/react-query'
|
||||||
import { Reorder, useDragControls } from 'framer-motion'
|
import { Reorder, useDragControls } from 'framer-motion'
|
||||||
|
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react'
|
||||||
import { api } from '../../../api/client'
|
import { api } from '../../../api/client'
|
||||||
import ConfirmDialog from '../../../components/ConfirmDialog'
|
import ConfirmDialog from '../../../components/ConfirmDialog'
|
||||||
import Tooltip from '../../../components/Tooltip'
|
import Tooltip from '../../../components/Tooltip'
|
||||||
|
|
@ -359,7 +360,14 @@ export default function CharacterPanel({
|
||||||
|
|
||||||
{/* 캐릭터 목록 (스크롤) */}
|
{/* 캐릭터 목록 (스크롤) */}
|
||||||
{characters.length > 0 && (
|
{characters.length > 0 && (
|
||||||
<div className="flex-1 min-h-0 overflow-y-auto -mx-4 px-4">
|
<OverlayScrollbarsComponent
|
||||||
|
className="flex-1 min-h-0 -mx-4"
|
||||||
|
options={{
|
||||||
|
scrollbars: { theme: 'os-theme-maple os-theme-dark', autoHide: 'leave', autoHideDelay: 800 },
|
||||||
|
}}
|
||||||
|
defer
|
||||||
|
>
|
||||||
|
<div className="px-4">
|
||||||
<Reorder.Group
|
<Reorder.Group
|
||||||
axis="y"
|
axis="y"
|
||||||
values={characters}
|
values={characters}
|
||||||
|
|
@ -379,6 +387,7 @@ export default function CharacterPanel({
|
||||||
))}
|
))}
|
||||||
</Reorder.Group>
|
</Reorder.Group>
|
||||||
</div>
|
</div>
|
||||||
|
</OverlayScrollbarsComponent>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue