Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 1.27 KB

README.md

File metadata and controls

35 lines (30 loc) · 1.27 KB

Tabs React Component

GitHub tag (latest by date) Travis (.org) branch GitHub issues GitHub closed pull requests Twitter Follow

This component displays tabs. It is used as part of https://howtocodewell.net

Install

$ npm install @howtocodewell/tabs

Example

To see an example of the component run

$ npm start

Test

To test the component

$ npm  test

Usage

import { TabList, Tab } from '@howtocodewell/tabs'

<TabList containerClassName={`tab-container`} listClassName={`list-reset flex border-b`}>
  <Tab label={`First Tab`} className={`bg-gray-500 border-r-2 border-gray-100 inline-block py-2 px-4 text-pink-300 font-semibold hover:text-black hover:bg-pink-300`} onClick={ () => alert('Hello Coders')  } />
  <Tab label={`Second Tab`} className={`bg-gray-500 inline-block py-2 px-4 text-pink-300 font-semibold hover:text-black hover:bg-pink-300`} onClick={ () => alert('Happy Coding')  } />
</TabList>