2.0.0 • Published 12 months ago

@sagemodeninja/color-scheme-provider v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Color Scheme Provider

A library for managing and tracking preferred color schemes in web applications, with automatic detection, customization options, and subscription-based notifications.

Documentation

See the wiki for guides on how to use the components.\ Or, see the demo site for examples and demos.

v2.* Breaking Changes

ColorSchemeProvider Members

  • Deprecated preferredColorScheme and colorScheme properties.
    • Subscribers are notified and given a scheme parameter with a value equivalent to the colorScheme property.
    • Use asynchronous update function to update schemes, this is equivalent to setting a value to preferredColorScheme.
  • Renamed subscribeNotification to subscribe.
  • Callback for subscribe now has a scheme parameter.

Behavior

  • Subscribing will now trigger an initial callback with the latest scheme value as a parameter.
  • The subscribe, toggle and the new update functions is now asynchronous.

Installation

From within your project, run:

npm i @sagemodeninja/color-scheme-provider

Contributing

See CONTRIBUTING.md for more information.

Set up

Initialize repo:

git clone https://github.com/sagemodeninja/color-scheme-provider.git
cd color-scheme-provider

Install the necessary dependencies:

npm install

Run a local demo:

npm start
2.0.0-rc.2

12 months ago

2.0.0-rc.3

12 months ago

2.0.0-rc.4

12 months ago

2.0.0-rc.5

12 months ago

2.0.0-rc.1

12 months ago

2.0.0

12 months ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago