joe_keski_basic_app_bar_1

1.2.9 • Public • Published

joe_keski_basic_app_bar_1

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save joe_keski_basic_app_bar_1

Usage

import React from 'react'
import BasicAppBar from 'joe_keski_basic_app_bar_1'

const App = () => {
  // For principal links in appbar
  const navItems = [
    { title: 'Link 1', link: '/link1' },
    { title: 'Link 2', link: '/link2', submenu: true }
  ]
  //For submenu categories
  const categories = [
    {
      id: 1,
      name: 'Categoría Título 1',
      link: '/categoriatitulo1',
      categoriesLinks: [
        { id: 1, name: 'Categoria 1', link: '/categoria1' },
        { id: 2, name: 'Categoria 2', link: '/categoria2' },
        { id: 3, name: 'Categoria 3', link: '/categoria3' }
      ]
    }
  ]

  //For the discount banner
  const [openDiscount, setOpenDiscount] = React.useState(true)
  const [showModal, setShowModal] = React.useState(false)

  const onShowModal = () => setShowModal(true)
  const onCloseModal = () => setShowModal(false)

  return (
    <>
      <BasicAppBar
        navItems={navItems}
        categories={categories}
        openDiscount={openDiscount}
        setOpenDiscount={setOpenDiscount}
        show={showModal}
        onShowModal={onShowModal}
        onCloseModal={onCloseModal}
        //cart products for request cart in API
        cartProducts={cartProducts}
      />
    </>
  )
}

License

MIT © Benjamngarcia

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.93latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.93
1.2.80
1.2.70
1.2.50
1.2.40
1.2.30
1.2.20
1.2.10
1.1.30
1.1.20
1.1.10
1.1.00
1.0.00

Package Sidebar

Install

npm i joe_keski_basic_app_bar_1

Weekly Downloads

3

Version

1.2.9

License

MIT

Unpacked Size

116 kB

Total Files

6

Last publish

Collaborators

  • benjamngarcia
  • fran-dev