README
Origin UI Shared State
Description
Library for managing shared state elements used for building Origin marketplace user interface. Consists of functions interacting with local storage.
Origin UI Shared State is a component of Energy Web Origin's SDK.
Installation
This package is available through the npm registry.
npm install @energyweb/origin-ui-shared-state
yarn add @energyweb/origin-ui-shared-state
Usage
- Language
// Available languages are specified in
// SupportedLanguagesEnum inside @energyweb/origin-ui-localization
setOriginLanguage(language: 'en' | 'pl'): void
// By default returns 'en'.
// If the language is not supported by localization package -
// returns 'en'
getOriginLanguage(): 'en' | 'pl'.
- Theme mode
saveThemeModeToLS(mode: 'light' | 'dark'): void
getThemeModeFromLS(): 'light' | 'dark'
- Token
setAuthenticationToken(token: string)
getAuthenticationToken(): string
removeAuthenticationToken(): void
Contributing Guidelines
See contributing.md
Energy Web Decentralized Operating System
EW-Origin is a component of the Energy Web Decentralized Operating System (EW-DOS).
The purpose of EW-DOS is to develop and deploy an open and decentralized digital operating system for the energy sector in support of a low-carbon, customer-centric energy future.
We develop blockchain technology, full-stack applications and middleware packages that facilitate participation of Distributed Energy Resources on the grid and create open market places for transparent and efficient renewable energy trading.
- To learn about more about the EW-DOS tech stack, see our documentation
For a deep-dive into the motivation and methodology behind our technical solutions, read our White Papers:
Connect with Energy Web
License
This project is licensed under the MIT License - see the LICENSE file for details