@discretize/gw2-ui-new
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

gw2-ui

code style: prettier

gw2-ui-new is a fork of gw2-ui by Manuel Haag. We implemented a number of changes to make working with the project more enjoyable:

  • Typescript for all components
  • CSS-modules instead of theme-ui
  • gw2-api interaction with hooks by Kulinda - this includes caching, batching and language awareness
  • Refactoring away most dependencies for a smaller, lightweight and more resilient library.

Installation

Prerequisites:

  • node >= 12.0.0
  • yarn >= 1.22.0 ?

Be sure your project is using a single React version. Use React 17 or force React 18 using a resolutions field in your package.json.

Install:

yarn add @discretize/gw2-ui-new
yarn add @discretize/typeface-menomonia

import the styles and typeface on every page where you want to use the components:

import '@discretize/gw2-ui-new/dist/default_style.css';
import '@discretize/gw2-ui-new/dist/index.css';
import '@discretize/typeface-menomonia';

Alternatively, you can overwrite the default_style.css file and import it in case you want to adjust the default theme.

In case you want to disable language selection based on the browser language, wrap pages with an APILanguageProvider.

Developing

yarn
yarn dev

Releasing

yarn run publish

Contributing

Contributions are welcome. Ideally, you reach out to us via github issue or discord to discuss your propositions before you commit time.

Make sure your commit messages follow the Conventional Commits specification.

Package Sidebar

Install

npm i @discretize/gw2-ui-new

Weekly Downloads

19

Version

0.1.4

License

MIT

Unpacked Size

1.21 MB

Total Files

174

Last publish

Collaborators

  • saballon