@scrimmage/ui-toolkit
v0.1.3
Published
<p align="center"> <a href="http://scrimmage.co/" target="blank"> <img src="https://cdn.scrimmage.co/icons/Scrimmage-Logo.webp" width="200" alt="Scrimmage Logo" /> </a> </p>
Downloads
11
Readme
Overview
@scrimmage/ui-toolkit is a collection of utilities and components that can be used to build alternative UIs for the Scrimmage app. Scrimmage Widget uses this library to build the UI.
Installation
npm install @scrimmage/ui-toolkit
Usage
import { getRequirementsProgress } from '@scrimmage/ui-toolkit';
// ...
const {
progress: levelRequirementProgresses,
overallProgress,
completed,
} = getRequirementsProgress(levelUpRequirements, userStats, {
onMissingIcon: requirement => (
<div>
{/* ... */}
</div>
),
onMissingTitle: 'Missing',
getProgressLabel: () => (
<div>
{/* ... */}
</div>
),
});