scaife-viewer / scaife-skeleton

front-end layout library for Scaife readers
https://scaife-viewer.org/
MIT License
2 stars 0 forks source link

Add ability to add arbitrary config options at site level #57

Closed paltman closed 4 years ago

paltman commented 4 years ago

This should allow passing in configuration values that can be available to widgets that vary from site to site.

Usage

const config = {
  mapAccessToken: 'XXXXXXXXX',
};
Vue.use(SkeletonPlugin, { iconMap, config });

Then in the widget:

  computed: {
      accessToken() {
        return this.$scaife.config.mapAccessToken;
      },
  }