Skip to content

Commit

Permalink
feat: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgutgon committed Jul 29, 2024
1 parent a6f909e commit c6c66ae
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
24 changes: 18 additions & 6 deletions packages/web-ui/src/ds/atoms/ResizablePane/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,33 @@ const ResizableHandle = ({
}: ComponentProps<typeof ResizablePrimitive.PanelResizeHandle>) => (
<ResizablePrimitive.PanelResizeHandle
className={cn(
'relative flex w-px items-center justify-center',
'bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2',
'w-px relative flex items-center justify-center',
'data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full',
'data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1',
'data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2',
'data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90',
'ring-offset-0',
// NOTE: Force the right cursor for the handle
'data-[panel-group-direction=horizontal]:!cursor-ew-resize data-[panel-group-direction=vertical]:!cursor-ns-resize',
'hover:ring-2 hover:ring-accent-foreground hover:bg-accent-foreground',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-foreground focus-visible:bg-accent-foreground',
className,
)}
{...props}
/>
>
<div
className={cn(
'group/handler',
'absolute inset-0 w-2 -left-1',
'duration-200 transition-all flex items-center justify-center',
)}
>
<div
className={cn(
'duration-75 transition-all',
'h-full w-px bg-border',
'group-hover/handler:w-0.5 group-hover/handler:bg-accent-foreground',
)}
/>
</div>
</ResizablePrimitive.PanelResizeHandle>
)

export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ const NodeHeaderWrapper = forwardRef<HTMLDivElement, Props>(function Foo(
</div>
)}
</div>
{!isEditing ? (
<div
className={cn(
'flex items-center opacity-0 group-hover/row:opacity-100',
{ 'opacity-100': actionsOpen },
)}
>
<div
className={cn(
'flex items-center opacity-0 group-hover/row:opacity-100',
{ 'opacity-100': actionsOpen },
)}
>
{!isEditing ? (
<DropdownMenu
tabIndex={0}
controlledOpen={actionsOpen}
Expand All @@ -171,8 +171,8 @@ const NodeHeaderWrapper = forwardRef<HTMLDivElement, Props>(function Foo(
side='bottom'
align='end'
/>
</div>
) : null}
) : null}
</div>
</div>
)
})
Expand Down

0 comments on commit c6c66ae

Please sign in to comment.