player-ui / player

Home Page:https://player-ui.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Core: New Reference Asset - Image

mercillo opened this issue · comments

An image asset should be added as a reference asset that will allow users to upload relevant images to complement or enhance text. An image asset should be able to have an optional placeholder tag and an optional caption incase users want to provide text with that image.

Requirements

  • An image asset should have a metaData,
  • Which should include a ref to the image .
  • As well as an optional accessibility , which will be a string for accessibility support.
  • An image asset should have an optional placeholder text.
  • The placeholder is a string
  • An image asset should have an optional caption text, if a caption needs to be displayed along with the image.
  • This caption should be an asset

At its simplest case, this JSON should render an image

    {
      "id": "image-1",
      "type": "image",
      "metaData": {
        "ref": "https://player-ui.github.io/latest/logo/logo-dark-large.png"
      }
    }

Execution:

Create a new Image asset in the core reference assets .
Add mocks to the mocks package to show the optional fields and show all implementations for rendering.

Can I work on this?