Skip to content
This repository was archived by the owner on Nov 19, 2018. It is now read-only.
This repository was archived by the owner on Nov 19, 2018. It is now read-only.

Allow <Status> component's text object to contain properties with component/node values #170

@rnicholus

Description

@rnicholus

...instead of just strings, that way you could do something like this:

const statusText = {
  upload_failed: <span>Failure <img src='red-x.png'/></span>,
  upload_successful: <span>Success! <img src='green-checkbox.png'/></span>,
  ...
}

<Status text={ statusText} />

The above would easily allow images/icons to be part of the status message. Additionally, if you use something like react-intl, this makes it a bit less awkward (IMHO) to provide translatable text:

const statusText = {
  upload_failed: <FormattedMessage id='Uploader.failed' />,
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions