Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sheet animation #622

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Conversation

alter-eggo
Copy link
Contributor

This pr adds

  • sheet animations in full and extension mode
  • close on click esc
Screen.Recording.2024-11-15.at.13.12.33.mov

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 23.81%. Comparing base (7361358) to head (c49a809).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #622   +/-   ##
=======================================
  Coverage   23.81%   23.81%           
=======================================
  Files         165      165           
  Lines        6151     6151           
  Branches      335      335           
=======================================
  Hits         1465     1465           
  Misses       4686     4686           
Components Coverage Δ
bitcoin 62.04% <ø> (ø)
query 12.73% <ø> (ø)
utils 48.31% <ø> (ø)
crypto 68.21% <ø> (ø)
stacks 54.71% <ø> (ø)

@@ -23,14 +23,17 @@ const meta: Meta<typeof Component> = {
export default meta;

export function Sheet() {
const [isShowing, setIsShowing] = useState(false);
const triggerRef = useRef<HTMLButtonElement>(null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be un-wise, but what do you think about Sheet exporting a hook like useSheet which returns functions around the refs, eg { triggerSheet, closeSheet } = useSheet(). Feels to me like Sheet should better encapsulate it's behaviors. Just a thought.

Really loving the animation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants