0.1.2 • Published 2 years ago

@acctglobal/stickbar v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Installation

yarn add @acctglobal/stick-bar
npm install @acctglobal/stick-bar
import { StickBar } from '@acctglobal/stick-bar'

StickBar

StickBar is a Component of a Carousel of texts that came from props.

Configuration

  1. Add import from component
import StickBar from '@acctglobal/stick-bar';
  1. Now call StickBar in code and pass the required props, texts must to be an Array of strings.

Component being Called with only mandatory props will look like this:

<StickBar texts={texts} />

Component can be customized with use of props:

<StickBar 
texts={TopBarTexts}
arrows={{ iconColor: '#fff', isArrowVisible: true, style: { backgroundColor: 'transparent' } }}
bullets={{ bulletDisableColor: '#000', bulletEnableColor: '#E8E8E8', isBulletVisible: true, numeric: true, style: { background: 'transparent' } }}
/>

StickBarProps:

Prop nameTypeDescription
textsstring The texts that must be rendered inside of Carousel
arrowsObjectCustomize the arrows from Carousel
bulletsObjectCustomize the bullets from Carousel

Arrows Object:

Prop nameTypeDescription
isArrowVisiblebooleanDefines if the arrow will be visible in Carousel
iconColorstringChange the arrow color
styleObjectAccept all kind of styles

Bullets Object :

Prop nameTypeDescription
numericbooleanDefines a numeric bullet
bulletEnableColorstringDefines the color of the enabled bullet
bulletDisableColorstringDefines the color of the disabled bullet
isBulletVisiblebooleanDefines if the bullet will be visible
styleObjectAccept all kind of styles