mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
<!--
Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md
-->
Adds resize functionality to the stack companion.
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Adds resizable width functionality to `StackCompanion` with drag
handle and visual feedback in `stack-companion.tsx`.
>
> - **Behavior**:
> - Adds resize functionality to `StackCompanion` in
`stack-companion.tsx`, allowing width adjustment between 280–2000px.
> - Implements drag handle for resizing with visual feedback during
drag.
> - Maintains collapsed state with fixed width and disabled transition
during drag.
> - **State Management**:
> - Introduces `width`, `isResizing`, `nubStretch`, and `nubInitialY`
states for handling resize logic.
> - Uses `useRef` for the resize handle element.
> - **Event Handling**:
> - Adds `handleMouseDown`, `handleMouseMove`, and `handleMouseUp` for
managing resize interactions.
> - Applies cursor and user-select styles during resize to enhance UX.
> - **Style**:
> - Adds visual elements for resize handle, including grip lines and
color transitions.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for
|
||
|---|---|---|
| .. | ||
| backend | ||
| dashboard | ||
| dev-launchpad | ||
| e2e | ||
| mock-oauth-server | ||
| oauth-mock-server | ||