1.0.18 • Published 5 months ago

@nlo/styleguide-menu v1.0.18

Weekly downloads
166
License
-
Repository
-
Last release
5 months ago

Styleguide menu

A vue component for a fullscreen styleguide menu overlay with searchable items

Installation

You can install the package through NPM.

npm install @nlo/styleguide-menu

Usage

To use the vue component and render the menu overlay you must first register the library and its components in your javascript boot script.

The necessary configuration should at least contain these lines:

// my-project/styleguide.js

import Vue from 'vue';
import StyleguideMenu from '@nlo/styleguide-menu';

@import "~@nlo/styleguide-menu/dist/styleguide";

function init() {
  StyleguideMenu.init();

  new Vue({
    el: '#styleguide'
  });
}

init();

Then include the vue file in your template and pass the menu items as props to render the styleguide menu overlay in your view.

<template>
    <menu-overlay title="My project" :menu-structure="menuStructure" />
</template>

<script>
  const menuStructure = [
    {
      Description: 'Atoms/Buttons',
      Title: 'Buttons',
      Url: '/styleguide/buttons'
    }
  ];

  export default {
    data() {
      menuStructure
    }
  }
</script>

Customization

There is a small theming system in place that allows you to override a set of variables, very similar to how bootstrap theming works. To make this work you can import a custom sass file in your boot script that could look like:

// my-project/styleguide.scss

// Import the source variables.scss file from the package
@import "~@nlo/styleguide-menu/dist/scss/variables";

$my-color-variable: yellow;

// Override imported variables from the styleguide-menu package with your own variables or values
$nlo-sg-primary-color: $my-color-variable;
$nlo-sg-floating-button-color: white;

// Finally import the styleguide.scss, make sure this is after your overrides
@import "~@nlo/styleguide-menu/dist/styleguide";
1.0.18

5 months ago

1.0.17

7 months ago

1.0.16

7 months ago

1.1.0-alpha.101

7 months ago

1.0.13-alpha.66

10 months ago

1.0.16-alpha.35

9 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.5-alpha.11

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1-alpha.128

4 years ago

0.0.1-alpha.130

4 years ago

0.0.1-alpha.126

4 years ago

0.0.1-alpha.124

4 years ago