ValyroUI English version

Crafting Recipe

Карточка рецепта: сборки, расход ингредиентов и нехватка. Бесплатно, MIT · Игры › Крафт

Установка

npx valyro-cli@latest add crafting-recipe
npx shadcn@latest add https://valyro.xyz/r/crafting-recipe.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { CraftingRecipe } from 'valyro-ui';

Пропсы

PropTypeDefault
recipe *RecipeThe recipe: what one batch makes and uses.
inventoryRecord<string, number>Stock per ingredient id; an ingredient without an entry is unknown (not zero).
quantitynumberResults asked for: a positive whole number.
defaultQuantitynumber1Initial quantity when uncontrolled. Default 1.
onQuantityChange(quantity: number) => voidCalled with the new quantity when it changes.
maxQuantitynumberLargest quantity the app allows; more shows an error instead of being clamped.
onCraft(request: CraftRequest) => void | Promise<void>Crafts: returning (or resolving) confirms it, throwing (or rejecting) refuses it. While a promise runs the button and the quantity are locked. Without it the card only computes.
disabledbooleanfalseLocks the quantity and the craft button.
headingLevel2 | 3 | 4 | 5 | 63Level of the result's heading. Default 3.
labelsPartial<CraftingRecipeLabels>Overrides for the built-in English text; keys left out keep their defaults.

Похожие компоненты

  • Tier List — Тир-лист S+…D: портреты с бейджем роли, фильтр ролей, перетаскивание мышью, тачем и с клавиатуры, экспорт
  • Meta Table — Таблица меты: тир, винрейт, пикрейт и банрейт с изменением за патч, фильтры роли и ранга, виртуализация
  • Matchup Matrix — Контрпики: матрица «чемпион против чемпиона» с тепловой шкалой и тултипами, выбор своего чемпиона, список на телефоне
  • Tournament Bracket — Турнирная сетка: single и double elimination, счёт серий, победитель, путь команды, монограммы
  • Patch Notes — Патчноут: чемпионы и предметы с иконками способностей, было → стало, бафф, нерф и изменение, фильтры

Назад: Patch Notes · Далее: Toggle · Весь раздел «Игры»