@focused-will/components
TypeScript icon, indicating that this package has built-in type declarations

0.3.6 • Public • Published

@focused-will/components

This repository contains shareable components for writing WoW related applications.

Components

TalentTree

TalentTree is a component that will accept a specific talent set and render it as a talent tree, currently it uses css-grid to render them in the expected layout that the game does.

import { TalentTree, SUPPORTED_SPECS } from "@focused-will/components";

/**
 * Render a TalentTree that displays the Discipline Priest spec talents
 */
<TalentTree
  talentNodes={SUPPORTED_SPECS.PRIEST.DISCIPLINE.TREE}
  onChange={(talents, points) => console.log(talents, points)}
/>;

TalentSet

TalentSet is a component that will accept a specific class and specs talent set and render it as a coupled set of talents. Use this if you are seeking to make use of WoWHead import functionality.

import { TalentTree, SUPPORTED_SPECS } from "@focused-will/components";

/**
 * Render a TalentSet that displays the Discipline Priest general and spec talents
 */
<TalentSpec
  classTalents={SUPPORTED_SPECS.PRIEST.DISCIPLINE}
  onChange={({ GENERAL, TREE }) => {
    if (GENERAL) {
      // handle general tree changes here
    }

    if (TREE) {
      // handle spec tree changes here
    }
  }}
/>;

Each specialization has a GENERAL and TREE member that correspond to their general and spec-specific trees. General trees for each spec are not interchangeable.

/@focused-will/components/

    Package Sidebar

    Install

    npm i @focused-will/components

    Weekly Downloads

    0

    Version

    0.3.6

    License

    ISC

    Unpacked Size

    5.86 MB

    Total Files

    143

    Last publish

    Collaborators

    • focused-will