Skip to content

Commit

Permalink
feat: dynamic width for entry column
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Apr 16, 2024
1 parent 445a1f9 commit 9dc8be4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function SocialMediaItem({
className="w-5 h-5 mr-2 rounded-sm shrink-0"
/>
<div>
<div className="line-clamp-5 text-sm flex-1 -mt-0.5 leading-tight text-[13px]">
<div className="line-clamp-5 text-sm flex-1 -mt-0.5 text-[13px]">
<div className='space-x-1'>
<span className='font-medium'>{entry.author}</span>
<span className="text-zinc-500">·</span>
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { FeedColumn } from '@renderer/components/feed-column'
import { EntryColumn } from '@renderer/components/entry-column'
import { useState } from 'react'
import { ActivedList } from '@renderer/lib/types'
import { cn } from '@renderer/lib/utils'

export function Component() {
const [activedList, setActivedList] = useState<ActivedList>(null)
Expand All @@ -12,7 +13,7 @@ export function Component() {
<div className="w-64 pt-10 border-r shrink-0 flex flex-col bg-[#E1E0DF]" onClick={() => setActivedList(null)}>
<FeedColumn activedList={activedList} setActivedList={setActivedList} />
</div>
<div className="w-[340px] pt-10 border-r shrink-0 h-full overflow-y-auto">
<div className={cn("pt-10 border-r shrink-0 h-full overflow-y-auto", activedList?.type === "Social Media" ? "flex-1 min-w-96" : "w-[340px]")}>
<EntryColumn activedList={activedList} activedEntry={activedEntry} setActivedEntry={setActivedEntry} />
</div>
<div className="flex-1 pt-10 px-4">Three</div>
Expand Down

0 comments on commit 9dc8be4

Please sign in to comment.