lead-art-block 5.17.1-arc-themes-release-version-2.0.3.4621
Install from the command line:
Learn more about npm packages
$ npm install @wpmedia/lead-art-block@5.17.1-arc-themes-release-version-2.0.3.4621
Install via package.json:
"@wpmedia/lead-art-block": "5.17.1-arc-themes-release-version-2.0.3.4621"
About this version
Themes lead art block. This block is for displaying the lead art of a story whether it is an image, gallery, video, or raw HTML.
Prop | Required | Type | Description |
---|---|---|---|
customFields.enableAutoplay | no | boolean | If the lead art type is video, configures the video to autoplay on page load. If value is true it will autoplay the video. If value is false, it will not autoplay the video. |
required prop | yes | ||
optional prop | no | ||
contentConfig example | Please specify which content sources are compatible |
Outline any schema information requirements necessary to know for ths block
-
promo_items.lead_art
orpromo_items.basic
=lead_art
lead_art.caption
lead_art.subtitle
lead_art.credits
lead_art.content
-
lead_art.type
determines what kind of content to render with
Phrase key | Default (English) |
---|---|
global.gallery-expand-button |
Expand |
global.gallery-autoplay-button |
%{current} of %{total} |
global.gallery-pause-autoplay-button |
Autoplay |
global.gallery-page-count-text |
Pause autoplay |
Blocks can emit events. When the LeadArt component is functioning as a Gallery, it will emit events for when the next or previous image is viewed.
Event Name | Description |
---|---|
galleryImageNext | The next image is viewed |
galleryImagePrevious | The previous image is viewed |
If you want to listen to these events, the first thing is to import the EventEmitter object
into your code:
import { EventEmitter } from '@wpmedia/engine-theme-sdk'
Then create a callback function such as:
const myGalleryImageNext = (event) => {console.log('Here is the event: ', event);}
const myGalleryImagePrevious = (event) => {console.log('Here is the event: ', event);}
Then use you use your callback in subscribing to the event:
EventEmitter.subscribe('galleryImageNext', (event) => myGalleryImageNext(event));
EventEmitter.subscribe('galleryImagePrevious', (event) => myGalleryImagePrevious(event));
The event object for these events will contain the following information:
eventName (String): The event name fired. In this case could be either galleryImageNext
or galleryImagePrevious
.
ansGalleryId (String): The id of the gallery.
ansGalleryHeadline (String): The headline for the gallery.
ansImageId (String): The id for the current image.
caption (String): The caption for the current image.
orderPosition (Number): The position in the carousel for the current image.
totalImages (Number): Total number of images in the carousel.
autoplay (boolean): whether or not the event triggered during autoplay. Value is either true
or false
.
This is optional. Please add an additional context that would be important to know in order to use this block.
Details
- lead-art-block
- WPMedia
- almost 2 years ago
- CC-BY-NC-ND-4.0
- 1 dependencies
Assets
- lead-art-block-5.17.1-arc-themes-release-version-2.0.3.4621.tgz
Download activity
- Total downloads 73
- Last 30 days 0
- Last week 0
- Today 0
Recent versions
View all- 5.17.1-arc-themes-release-version-2.4.0.4885
- 5.17.1-arc-themes-release-version-1.33.3561
- 5.17.1-arc-themes-release-version-2.3.1.4873
- 5.17.1-arc-themes-release-version-2.3.0.4874
- 5.17.1-arc-themes-release-version-2.3.0.4856
- 5.17.1-arc-themes-release-version-2.1.4.4838
- 5.17.1-arc-themes-release-version-2.1.3.4773
- 5.17.1-arc-themes-release-version-2.1.3.4759
- 5.17.1-arc-themes-release-version-2.1.2.4757
- 5.17.1-arc-themes-release-version-2.1.3.4756