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/160 settings page implement subscription cancel feedback modal #298

Conversation

shuaibu-shehu
Copy link
Collaborator

SubscriptionCancelModal Component

Overview

The SubscriptionCancelModal component is a modal dialog designed to confirm the cancellation of a subscription. It provides options to reactivate the subscription or navigate back to the dashboard.

Screenshot from 2024-07-21 23-44-13

Props

The component accepts the following props:

children (required)

  • Type: React.ReactNode
  • Description: The button text or element that triggers the modal.

onReactivateSubscription (optional)

  • Type: () => void
  • Description: A callback function that is called when the "Reactivate Subscription" button is clicked.

Usage

Here is an example of how to use the SubscriptionCancelModal component:

import React from 'react';
import SubscriptionCancelModal from './SubscriptionCancelModal';

function SettingsPage() {
  const handleReactivateSubscription = () => {
    // Reactivate subscription logic
  };

  return (
    <div>
      <h1>Settings</h1>
      <SubscriptionCancelModal onReactivateSubscription={handleReactivateSubscription}>
        Cancel Subscription
      </SubscriptionCancelModal>
    </div>
  );
}


export default SettingsPage;

@shuaibu-shehu shuaibu-shehu linked an issue Jul 21, 2024 that may be closed by this pull request
9 tasks
@JulianaSau
Copy link

@shuaibu-shehu update your branch with latest changes

@shuaibu-shehu
Copy link
Collaborator Author

shuaibu-shehu commented Jul 22, 2024

@shuaibu-shehu update your branch with latest changes

@JulianaSau done!

@chumex412 chumex412 merged commit c3204c3 into hngprojects:dev Jul 23, 2024
1 check passed
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.

[FEAT] - SETTINGS PAGE - Implement Subscription Cancelled Feedback Modal
3 participants