Skip to main content
Version: 1.0.0

SelectModal

The select modal is used to let the user select the product and the plan they want to subscribe to.

Loading...

Usage#

import React from "react";
import {
SelectModal,
PelcroModalController,
usePelcro,
} from "@pelcro/react-pelcro-js";
import "@pelcro/react-pelcro-js/dist/pelcro.css";
export const SelectExample = () => {
const { switchView } = usePelcro();
return (
<>
<button onClick={() => switchView("plan-select")}>Subscribe now</button>
<PelcroModalController>
<SelectModal />
</PelcroModalController>
</>
);
};

Reference#

Props#

onDisplay#

() โ‡’ void

Callback function called when the modal is first displayed.

onClose#

() โ‡’ void

Callback function called when the modal is closed.