@mentor-medier/placeholder-image-block

5.13.3 • Public • Published

@wpmedia/placeholder-image-block

Fusion News Theme placeholder image. The intended use is to take the feature pack fallback image, as an external url or relative path.

Acceptance Criteria

  • Add AC relevant to the block

Props

Prop Required Type Description
required prop yes
optional prop no
contentConfig example Please specify which content sources are compatible

ANS Schema

Outline any schema information requirements necessary to know for ths block

ANS Fields

  • n/a

Internationalization fields

Phrase key Default (English)
key english translation

Events

Blocks can emit events. The following is a list of events that are emitted by this block.

Event Name Description
eventName Describe the event

Event Listening

Include block specific instructions for event listening.

OR

This block does not emit any events.

Additional Considerations

Please advise the useFusionContext docs.

This was adapted from the footer block's usage of the deployment() for relative blocks. This block does not support base64.

Takes in the desired height and width and small, medium and large breakpoints. See image document in news theme development file for more info on resizing in the future.

Usage

CustomBlock.jsx

import PlaceholderImage from '@wpmedia/placeholder-image-block';

const Component = ({width = 100}) =>
  <PlaceholderImage
    smallWidth={width}
    smallHeight={154}
    mediumWidth={274}
    mediumHeight={154}
    largeWidth={400}
    largeHeight={225}
  />

blocks.json

    "default": {
      "siteProperties": {
        "fallbackImage": "https://arc-anglerfish-staging-staging.s3.amazonaws.com/public/NA6FMAXWP5DR3FDZQ7SGJ3C3FE.png",


Package Sidebar

Install

npm i @mentor-medier/placeholder-image-block

Weekly Downloads

0

Version

5.13.3

License

CC-BY-NC-ND-4.0

Unpacked Size

15.3 kB

Total Files

8

Last publish

Collaborators

  • mm-bjarneo
  • mentor-devops