Skip to content

πŸ›[Bug] Export AppliesToEligibility and ProductOrCollectionResource typesΒ #221

@vincaslt

Description

@vincaslt

Issue summary

AppliesToEligibility and ProductOrCollectionResource are not exported in @shopify/discount-app-components, so they can't be easily used to give types to form field values:

eligibility: useField(AppliesToEligibility.Products),
selectedItems: useField<ProductOrCollectionResource[]>([]),

<AppliesTo
  eligibility={eligibility}
  selectedItems={selectedItems}
/>

Expected behavior

Actual behavior

Steps to reproduce the problem

  1. First step
  2. Second step

Reduced test case

The best way to get your bug fixed is to provide a reduced test case. This CodeSandbox template is a great starting point.

Specifications

  • Are you using the React components? (Y/N):
  • discount-app-components version number:
  • Browser:
  • Device:
  • Operating System:

Or run npx envinfo --system --binaries --browsers --npmPackages react,react-dom,@shopify/discount-app-components to provide specifications on your environment including version numbers, browser, device, and operating system.

Paste the results here:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions