@ebi-gene-expression-group/atlas-information-banner

2.0.1 • Public • Published

Expression Atlas Information Banner

A React component that renders a message in Markdown, which can be dismissed by clicking a close button.

Usage

import AtlasInformationBanner from '@ebi-gene-expression/atlas-information-banner'

const loremIpsum = `
# Lorem ipsum

*Lorem ipsum dolor sit amet*, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
 
Ut enim ad minim veniam, --quis nostrud exercitation-- ullamco laboris nisi ut aliquip ex ea commodo consequat.

<a href="https://en.wikipedia.org/wiki/Lorem_ipsum">More about Lorem Ipsum</a> 
`

ReactDOM.render(
  <AtlasInformationBanner
    motd={loremIpsum} />,
  target)

Props

Name Type Default value
motd string ''

The component supports GitHub Flavoured Markdown as well as raw HTML tags. If the motd prop is not a string or is empty, nothing is rendered.

Look And Feel

For a correct presentational and functional behaviour the EBI Visual Framework must be loaded in the document. See html/index.html for a fully working example and a real use case. The current version has only been tested with v1.3 but other minor versions should work as well. In particular it uses the Foundation Close Button.

Other than removing the bottom margin from the callout, all other layout options are left to the client.

Readme

Keywords

none

Package Sidebar

Install

npm i @ebi-gene-expression-group/atlas-information-banner

Weekly Downloads

1

Version

2.0.1

License

Apache-2.0

Unpacked Size

5.66 kB

Total Files

4

Last publish

Collaborators

  • ebi-karel
  • alfonsomunozpomer
  • lingyun1010
  • haideriqbal
  • ukumbham