1.1.0 • Published 4 years ago

@mozilla/factor-ui v1.1.0

Weekly downloads
-
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-ui

Templates

Include

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

In component import

<template>
  <FactorBlockTemplate>
    <div slot="nav" >
      <!-- Nav content -->
    </div>
    <div slot="profile">
      <!-- Profile content -->
    </div>
    <div slot="main">
      <!-- Main content -->
    </div>
    <div slot="footer-links">
      <!-- Links in footer content -->
    </div>
  </FactorBlockTemplate>
</template>

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

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

This works the same with each of the different templates: FactorBlockTemplate, FactorFlowTemplate, FactorNavTemplate

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

Block template

Block Template

Flow template

Flow Template

Nav Template

Nav Template

1.1.0

4 years ago

1.0.0

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago