0.0.4-1 • Published 3 years ago

@slickteam/slick-topbar v0.0.4-1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

\

Description

A topbar with a burger that emits an event when clicked on. There is the possibility of adding a logo and a title if needed. This web component was made using lit element.

Installation

npm i @slickteam/slick-topbar

Usage

  • Html vanilla
<script type="module">
  import '@slickteam/slick-topbar';
</script>

<slick-topbar></slick-topbar>
  • Vue.js
<template>
  <div>
    <h1>Test Page</h1>
    <slick-topbar
        :imgSrc="image"
    ></slick-topbar>
  </div>
</template>

<script>
import '@slickteam/slick-topbar';
import image from './path/to/image/file'

export default {
  name: 'TestPage', 
  data() {
      return {
          image: image,
      }
  },
}
</script>

<style scoped>
/* Put CSS */
</style>

Template

    <slick-topbar
      hideTitle
      titleContent="The title you want to display"
      hideLogo
      imgSrc
      color="#000000"
      backgroundColor="#FFF"
    ></slick-topbar>

Properties

NameTypeDescription
hideTitleBooleanHide the title if not needed
titleContentStringDefine text content of the title
hideLogoBooleanHide the logo that is next to the burger
imgSrcStringThe image source
colorStringCustom color
backgroundColorStringCustom background color

Events

NameDescription
slick-burgerThe event emitted when the burger is clicked, it potentially allows to open a navigation drawer.

Development

Demoing with Storybook

To run a local instance of Storybook for your component, run

npm run storybook

To build a production version of Storybook, run

npm run storybook:build
0.0.4-1

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0-1

3 years ago

0.0.0-0

3 years ago

0.0.0

3 years ago