Preparing search index...

    Function buildRecipePersonsProps

    • Builds props for RecipeNumber component displaying servings

      Handles mode-specific behavior:

      • readOnly: Displays formatted person count
      • edit/addManual: Editable number input
      • addOCR with default value: Shows OCR button with manual fill option

      Parameters

      • stackMode: recipeStateType

        Current recipe screen mode

      • recipePersons: number

        Current person count

      • setRecipePersons: Dispatch<SetStateAction<number>>

        Setter function for person count

      • openModalForField: (field: recipeColumnsNames) => void

        Callback to open OCR modal

      • t: (key: string) => string

        Translation function

      Returns RecipeNumberProps

      Props object for RecipeNumber component