1.2.9 • Published 1 year ago

joe_keski_basic_app_bar_1 v1.2.9

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

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

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago