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: add custom options #43

Merged
merged 2 commits into from
Dec 14, 2021
Merged

feat: add custom options #43

merged 2 commits into from
Dec 14, 2021

Conversation

douglaseggleton
Copy link
Collaborator

Allows you to add custom options to Embed that will be processed outside of Gr4vy.

<Gr4vyEmbed
  // Provide a list of custom options
  customOptions={[
    {
      label: 'Giftcard',
      method: 'giftcard',
      description: 'You will be asked to enter a giftcard',
      iconUrl: `data:image/svg+xml,...`,
    }
  ]}

  // Handle the submit for a custom option
  onCustomSubmit={({ method: 'giftcard' }) => {
    alert(`Paid by ${method}`);
  }}
/>

2021-12-14 11 47 18

@douglaseggleton douglaseggleton added minor Increment the minor version when merged enhancement New feature or request release Create a release when this pr is merged and removed enhancement New feature or request labels Dec 14, 2021
@douglaseggleton douglaseggleton merged commit 17c917e into main Dec 14, 2021
@douglaseggleton douglaseggleton deleted the custom_options branch December 14, 2021 13:14
@gr4vy-code
Copy link
Collaborator

🚀 PR was released in v2.2.0 🚀

@gr4vy-code gr4vy-code added the released Issue or pull request released label Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged release Create a release when this pr is merged released Issue or pull request released
Development

Successfully merging this pull request may close these issues.

3 participants