0.0.14 • Published 4 years ago

@mozilla-factor/core v0.0.14

Weekly downloads
1
License
MPL-2.0
Repository
github
Last release
4 years ago

Factor UI

Project description

This will be a central repository for internally shared templates and components within Mozilla. This README will be the central location for all documentation relating to our internal components.

This project is intended to be a helpful "bootstrapped" kickstarter for all internal applications, providing out of the box internal themes and styles while allowing for flexibility to each individual application.

Installation

Run the following command in your terminal

npm install --save @mozilla-factor/core

Templates

Block template

Include this in whichever VueJS component you wish to use the template.

In component import

<template>
  <FactorBlockTemplate>
    <div slot="main">
      <div slot="logo">
        <img src="logo-url" />
      </div>
      <router-view slot="main" />
      <ProfileNav slot="profile"></ProfileNav>
      <FooterLinks slot="footer-links"></FooterLinks>
    </div>
  </FactorBlockTemplate>
</template>

<script>
import { FactorBlockTemplate } from '@mozilla-factor/core';
import '@mozilla-factor/core/dist/factor.css';

export default {
  components: {
    FactorBlockTemplate
  },
  data () {
    return {
      value: 0
    }
  }
}
</script>

Api

PropertyTypeDescription
searchBarHandlerFunction | (value) => {}Handler function for whatever is returned in the header search bar on update
searchBarLabelStringDefault placeholder text for the search bar

Slots

NameTypeArea
logoHTML ElementUpper left logo
navHTML ElementUpper right nav area next to the profile area
profileHTML ElementUpper right profile area
mainHTML ElementAll content between header and footer
footer-linksHTML ElementList of footer links

Flow template

Coming soon!

Nav Template

Coming soon!