mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-23 18:10:26 +08:00
style(sessions): update styling and add scrollbar props to DynamicVirtualList
- Change class name from agents-tab to sessions-tab and add flex layout - Add overflowX hidden and autoHideScrollbar props to DynamicVirtualList
This commit is contained in:
parent
947695fdc7
commit
c52cc5a94f
@ -99,7 +99,7 @@ const Sessions: React.FC<SessionsProps> = ({ agentId }) => {
|
|||||||
initial={{ opacity: 0 }}
|
initial={{ opacity: 0 }}
|
||||||
animate={{ opacity: 1 }}
|
animate={{ opacity: 1 }}
|
||||||
transition={{ duration: 0.3 }}
|
transition={{ duration: 0.3 }}
|
||||||
className="agents-tab h-full w-full p-2">
|
className="sessions-tab flex h-full w-full flex-col p-2">
|
||||||
<motion.div initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }}>
|
<motion.div initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }}>
|
||||||
<Button
|
<Button
|
||||||
onPress={handleCreateSession}
|
onPress={handleCreateSession}
|
||||||
@ -110,7 +110,14 @@ const Sessions: React.FC<SessionsProps> = ({ agentId }) => {
|
|||||||
</motion.div>
|
</motion.div>
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
{/* h-9 */}
|
{/* h-9 */}
|
||||||
<DynamicVirtualList list={sessions} estimateSize={() => 9 * 4}>
|
<DynamicVirtualList
|
||||||
|
list={sessions}
|
||||||
|
estimateSize={() => 9 * 4}
|
||||||
|
scrollerStyle={{
|
||||||
|
// FIXME: This component only supports CSSProperties
|
||||||
|
overflowX: 'hidden'
|
||||||
|
}}
|
||||||
|
autoHideScrollbar>
|
||||||
{(session, index) => (
|
{(session, index) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
key={session.id}
|
key={session.id}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user