@blaze-cms/plugin-banners-fe

0.39.7-alpha.0 • Public • Published

Banners Blaze plugin

Plugin where we create and load content to the Portal in order to load the wallpaper banner at the top level of the app.

Directly in the frontend, we include the Portal component, it only has one prop that is required to modifiy another div's classname.

<Portal
  setModifier={value => {
    if ((!value && wallpaperBannerModifier) || (value && !wallpaperBannerModifier)) {
      this.setState({ wallpaperBannerModifier: value });
    }
  }}
/>

Components

Portal

Checks if there is data related to the wallpaper banner in the local state (using the GET_PORTAL_COMPONENT query) If there is, render the PortalContent.

PortalContent

Get banner data from local state (adunit etc) and creates a portal in the main app's container in order to render the wallpaper banner.

Services

Queries to read form the local state in order to check if there is any wallpaper banner set on page (and if yes, its data).

Readme

Keywords

none

Package Sidebar

Install

npm i @blaze-cms/plugin-banners-fe

Weekly Downloads

4

Version

0.39.7-alpha.0

License

GPL-3.0

Unpacked Size

58.3 kB

Total Files

25

Last publish

Collaborators

  • ismael_haytam
  • emcleandev
  • tanane
  • daoyong
  • marekb9
  • mcabrerapf
  • jan_byte9
  • grzegorzi
  • andypail
  • ishrat
  • adrdilauro