0.0.7 • Published 2 years ago

@spheremall_org/common-module v0.0.7

Weekly downloads
2
License
-
Repository
-
Last release
2 years ago

Sm-Common

This package includes common components for SphereMall products.

- Sidenav-menu

Installation

  • app.module.ts:
import {SmCommonModule} from '@spheremall_org/common-module';

@NgModule({
  imports: [SmCommonModule]
})
  • app.components.ts:
export class AppComponent {
  menuColor          = 'black'; // default is black
  menuSelectionColor = 'lightgray'; // defaul is lightgray
  menuItems          = [
    {
      title   : 'Menu item',
      icon    : 'mat-icon',
      children: [
        {
          title: 'Sub-menu item',
          link : 'sub-menu-item,',
          icon : 'mat-icon'
        },
      ]
    }
  ]
}
  • app.component.html:
<mat-toolbar class="header-panel">
  <mat-toolbar-row>
    <div class="app-title">
      <sm-navigation-hamburger-button></sm-navigation-hamburger-button>
    </div>
  </mat-toolbar-row>
</mat-toolbar>

<sm-navigation
  [menuItems]="menuItems"
  [color]="menuColor"
  [selectionColor]="menuSelectionColor"
></sm-navigation>
  • styles.scss:
app-root {
  display: flex;
  flex-wrap: wrap;
}

.content-wrapper {
  flex: 1;
}
0.0.7

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago