Skip to content

IBM/ibm-dotcom-think-banner

Repository files navigation

@ibmdotcom/think-banner

This is a reusable banner to promote the Think event in IBM.com

NPM JavaScript Style Guide

Install

npm install --save @ibmdotcom/think-banner

Running Locally

As recommended by create-react-library docs, it’s better to open two terminal windows (or tabs). In the first one, run rollup to watch your src/ module and automatically recompile it into dist/ whenever you make changes.

cd ibm-dotcom-think-banner && npm start

In the second terminal:

cd ibm-dotcom-think-banner/example && npm start

Also, create a .env file in the example directory and add the following to ensure the sass path compiles correctly

SASS_PATH=node_modules:src

Usage

The banner should be added above either the DotcomShell or Masthead component from @carbon/ibmdotcom-react

import React, { Component } from 'react'

import { Banner } from '@ibmdotcom/think-banner'
import { DotcomShell } from '@carbon/ibmdotcom-react'
import '@ibmdotcom/think-banner/dist/index.css'

class Example extends Component {
  render() {
    return (
      <>
        <Banner />
        <DotcomShell mastheadProps={{...mastheadProps}}   footerProps={{...footerProps}}>
          {children}
        </DotcomShell>
      </>
    )
  }
}

License

MIT © ibmdotcom-bot

About

This is a reusable banner to promote the Think event in IBM.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •