Skip to content

feat(lynx): add lynx-toggle headless package#1647

Open
junghyeonsu wants to merge 2 commits into
lynx-image-pkgfrom
lynx-toggle-pkg
Open

feat(lynx): add lynx-toggle headless package#1647
junghyeonsu wants to merge 2 commits into
lynx-image-pkgfrom
lynx-toggle-pkg

Conversation

@junghyeonsu

Copy link
Copy Markdown
Contributor

Summary

Adds @seed-design/lynx-toggle — a headless hook for toggle (pressed) state + tap.

Changes

  • useToggle: mirrors @seed-design/react-toggle's API (pressed/defaultPressed/onPressedChange) but composes lynx-use-controllable-state + lynx-use-press-tap
    • pressed (on/off), active (pressed-down visual), rootProps (bindtap/touch handlers)
  • ToggleContext + useToggleContext (throw on missing provider)
  • ToggleContext typed with @lynx-js/react's Context<T> so the d.ts stays portable

Verification

  • bunchee build + typecheck green
  • 9 tests passing (controlled/uncontrolled, disabled, bindtap → toggle, active state)
  • Real UI verification will happen in the ImageFrame ReactionButton PR

Stack

PR 3/4 — base: lynx-image-pkg (PR #1646). Depends on PR #1645 (headless split). Merge #1645#1646 → this.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c317571

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@seed-design/lynx-toggle Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0ab53bdf-f665-46bc-a7b0-184a584b2165

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lynx-toggle-pkg

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

junghyeonsu and others added 2 commits June 8, 2026 19:08
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant