0.1.5 • Published 1 year ago

component-lib-elite v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Elite NPM Component Library

This repository contains the code for the Elite NPM package

List of components to use:

  • Button
  • Navbar
  • Modal

To use the library:

  1. Install the package via npm i component-lib-elite
  2. Import the component you want to use, eg. import { Button } from "component-lib-elite";

Button Component

The button can accept the following props:

import { Button } from "component-lib-elite";

function App() {
  return (
    <div className="App">
      <Button
          label="My label"
          bgColor="blue"
          onClickHandler={() => console.log("HELLO")}
          paddingX={30}
          paddingY={30}
          textSize={30}
      />
    </div>
  );
}

export default App;

The Navbar Component

The Navbar can accept the following props:

import { Navbar } from "component-lib-elite";

function App() {
  const listOfLinks = [
    {
      linkName: "Home",
      linkUrl: "/"
    },
    {
      linkName: "Contact",
      linkUrl: "/contact"
    },
    {
      linkName: "About",
      linkUrl: "/about"
    }
  ]
  return (
    <div className="App">
       <Navbar
        menuList={listOfLinks}
        navbarHeight="70px"
        navbarBgColor="blue"
        brandName="Elite"
        navLinksSize={20px}
      />
    </div>
  );
}

export default App;

The Modal Component

The Modal can accept the following props:

import { Modal } from "component-lib-elite";
import { useState } from "react"

function App() {
  const [modal, setModal] = useState(false)
  return (
    <div className="App">
      <button onClick={() => setModal(true)}>Open Modal</button>
      <Modal
        isOpen={modal} //required
        toggle={setModal} //required
        contentBgColor="blue"
        headerText="Elite Header"
        headerTextColor={"#000"}
      >
        <div>The content to show in the Modal</div>
      </Modal>
    </div>
  );
}

export default App;
0.1.4

1 year ago

0.1.3

1 year ago

0.1.5

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago