2.0.0 • Published 3 years ago

@tdcerhverv/hero v2.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Hero

The Main hero module to tdk.dk website. This module can be customized to fit the usecases of the whole site. If only one slide is provided, then the controls will be removed.

Installation

> npm install @tdcerhverv/hero

Usage

const hero = require('@tdcerhverv/hero')

or with ES6

import { Hero } = from '@tdcerhverv/hero';

Component Props

IHero Props

  • isCarousel: boolean // Required
  • slides: Array of Slides // Required
  • autoplay: boolean - Set the Carousel to auto change slides
  • timeOut: number - number in milisecond, eg 1000 = 1 sec.

ISlider Props

  • title: string // Required
  • heading: string
  • subHeading: string - not displayed in carousel mode
  • inverted: boolean - Inverts the colors of the slide content and controls
  • backgroundImageUrl: string - eg. url for the image
  • backgroundPosition: string, eg. 'center center' or '50% 50%'
  • disableOverlay: boolean
  • button: IButton

IButton Props

  • title: string
  • link: string