CreditsPopup Component
The CreditsPopup component is a React component that provides a customizable popup for displaying information, alerts, or notifications to users.
Last updated
import { CreditsPopup } from '@questLabs/react-sdk';<CreditsPopup
isOpen={true}
onClose={() => handleClosePopup()}
headingText="Popup Heading"
descText="This is the popup description."
isCloseble={true}
continueButton={true}
buttonText="Continue"
buttonFunction={() => handleContinueButtonClick()}
/>import React, { useState } from 'react';
import {CreditsPopup} from '@questLabs/react-sdk';
function App() {
const [isPopupOpen, setIsPopupOpen] = useState(false);
const handleClosePopup = () => {
setIsPopupOpen(false);
};
const handleOpenPopup = () => {
setIsPopupOpen(true);
};
const handleContinueButtonClick = () => {
// Define the action to be performed when the continue button is clicked
};
return (
<div>
<h1>Your Application</h1>
<button onClick={handleOpenPopup}>Show Popup</button>
<CreditsPopup
isOpen={isPopupOpen}
onClose={handleClosePopup}
headingText="Popup Heading"
descText="This is the popup description."
isCloseble={true}
continueButton={true}
buttonText="Continue"
buttonFunction={handleContinueButtonClick}
/>
</div>
);
}
export default App;