Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Base interface:

    Code Block
    languagetypescript
    { 
      title: 'Show section items in cart',
      description:
        'All the items from this section will be available directly in the cart. The section name will be the header title',
      name: 'showSectionItemsOnCart',
      type: 'boolean',
      initialValue: false,
      hidden: () => ctx.isUS
    }
  • The hidden key will be important to not show the toggle for the US market

  • Use the validation field and add logic to show an error in Sanity if the toggle is ON but the user doesn’t select any mode (we changed what I showed in the video above to improve the UX)

For the “Service Modes” toggles:

...