0.3.6 • Published 2 years ago

@focused-will/components v0.3.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@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.

0.3.6

2 years ago

0.3.5

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.6

2 years ago

0.1.1

2 years ago