Skip to content

feat: add subscription status toggle component#77

Open
MerlinTheWhiz wants to merge 1 commit into
ShadeProtocol:mainfrom
MerlinTheWhiz:feat/subscription-status-toggle
Open

feat: add subscription status toggle component#77
MerlinTheWhiz wants to merge 1 commit into
ShadeProtocol:mainfrom
MerlinTheWhiz:feat/subscription-status-toggle

Conversation

@MerlinTheWhiz
Copy link
Copy Markdown

Closes #37

Changes made:

  • src/components/ui/switch.tsx (new): Reusable accessible toggle switch using role="switch" + aria-checked. Follows shadcn/ui conventions: accepts checked, onCheckedChange, disabled, className, id, aria-label. Styled with bg-primary when on, bg-input when off, with the knob animating via translate-x.
  • src/components/subscription/subscription-plan-card.tsx (updated) — Added:
    • "use client" directive (needed for useState)
    • defaultAcceptingNewSubscribers prop (defaults to true)
    • Local acceptingNewSubscribers state managed by useState
    • "Accepting New Subscribers" label with the Switch toggle in the card's footer area, below the active subscribers count

How it works:

The SubscriptionPlanCard now renders a toggle labeled "Accepting New Subscribers" that switches between true/false locally via useState. The Switch component is decoupled and reusable anywhere in the app.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@MerlinTheWhiz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Implement Subscription Status Toggle

1 participant