Skip to content

Commit 2bfafcc

Browse files
authored
Users/benfeely/docs (#3)
* Some refactoring and cleanup of directory structure. * Style updates for nav. * Fix some style issues when subnav is not used. * Fix regression in the collapsing subnav. * More updates for responsive nav. * Bug fix. * Update fabric lib to use module per component. * Final touches for this round in docs. * Update to docs.
1 parent 270114b commit 2bfafcc

File tree

100 files changed

+891
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+891
-406
lines changed

apps/demo/src/app/app.component.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ <h2>Getting up and running...</h2>
44

55
<ol>
66
<li>Add <i>AngularReactBrowserModule</i>> to <i>app.module.ts</i> in place of the default <i>BrowserModule</i>.</li>
7-
<li>Add <i>AngularReactFabricModule</i> or <i>AngularReactFabricModule</i> to <i>app.module.ts</i> imports.</li>
7+
<li>Add <i>Fab[component]Module</i> or <i>Mat[component]Module</i> to <i>app.module.ts</i> imports.</li>
88
<li>Add Fabric or Material components to your views.</li>
99
</ol>
1010
</div>
1111

1212
<div>
13-
<fabric-button label="Test Dialog" (onClick)="toggleDialog()"></fabric-button>
14-
<fabric-dialog [hidden]="dialogHidden" (onDismiss)="toggleDialog()" key="d2" title="Fabric [React] Dialog" subText="Use Fabric React components inside your Angular app!" [type]="DialogType.largeHeader">
13+
<fab-button label="Test Dialog" (onClick)="toggleDialog()"></fab-button>
14+
<fab-dialog [hidden]="dialogHidden" (onDismiss)="toggleDialog()" key="d2" title="Fabric [React] Dialog" subText="Use Fabric React components inside your Angular app!" [type]="DialogType.largeHeader">
1515
Hello world! {{ counter }}
16-
<fabric-dialog-footer>
17-
<fabric-button (onClick)="incrementCounter()" label='Save' style="margin-right:10px;"></fabric-button>
18-
<fabric-button (onClick)="toggleDialog()" label='Cancel'></fabric-button>
19-
</fabric-dialog-footer>
20-
</fabric-dialog>
16+
<fab-dialog-footer>
17+
<fab-button (onClick)="incrementCounter()" label='Save' style="margin-right:10px;"></fab-button>
18+
<fab-button (onClick)="toggleDialog()" label='Cancel'></fab-button>
19+
</fab-dialog-footer>
20+
</fab-dialog>
2121
</div>
2222

2323
<img src="assets/app-module-dif.png">

apps/demo/src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { NgModule } from '@angular/core';
22
import { NxModule } from '@nrwl/nx';
33

44
import { AngularReactBrowserModule } from '@angular-react/core';
5-
import { AngularReactFabricModule } from '@angular-react/fabric';
5+
import { FabButtonComponent, FabDialogModule } from '@angular-react/fabric';
66
import { AppComponent } from './app.component';
77

88

99
@NgModule({
10-
imports: [AngularReactBrowserModule, NxModule.forRoot(), AngularReactFabricModule],
10+
imports: [AngularReactBrowserModule, NxModule.forRoot(), FabButtonComponent, FabDialogModule],
1111
declarations: [AppComponent],
1212
bootstrap: [AppComponent]
1313
})
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
33

4-
import { LandingComponent } from './containers/landing/landing.component';
5-
import { AngularPerfComponent } from './containers/angular-perf/angular-perf.component';
6-
import { MixedPerfComponent } from './containers/mixed-perf/mixed-perf.component';
7-
import { FabricComponent } from './containers/fabric/fabric.component';
8-
import { MaterialComponent } from './containers/material/material.component';
9-
import { ProfilesComponent } from './containers/profiles/profiles.component';
4+
import {
5+
AngularPerfComponent,
6+
ComponentDocsComponent,
7+
DocsComponent,
8+
FabricComponent,
9+
LandingComponent,
10+
MaterialComponent,
11+
MixedPerfComponent,
12+
PerformanceComponent,
13+
ProfilesComponent,
14+
} from './containers';
1015

1116

1217
const routes: Routes = [
1318
{ path: 'landing', redirectTo: '' },
1419
{ path: '', component: LandingComponent },
15-
{ path: 'performance', children: [
20+
{ path: 'performance', component: PerformanceComponent, children: [
1621
{ path: '', redirectTo: 'angular', pathMatch: 'full' },
1722
{ path: 'angular', component: AngularPerfComponent },
1823
{ path: 'mixed', component: MixedPerfComponent },
1924
{ path: 'profiles', component: ProfilesComponent },
2025
] },
21-
{ path: 'components', children: [
26+
{ path: 'components', component: ComponentDocsComponent, children: [
2227
{ path: '', redirectTo: 'fabric', pathMatch: 'full' },
2328
{ path: 'fabric', component: FabricComponent },
2429
{ path: 'material', component: MaterialComponent },
2530
] },
26-
{ path: 'docs', component: LandingComponent },
31+
{ path: 'docs', component: DocsComponent },
2732
];
2833

2934
@NgModule({
@@ -33,6 +38,5 @@ const routes: Routes = [
3338
exports: [
3439
RouterModule
3540
],
36-
declarations: []
3741
})
38-
export class AppRoutingModule { }
42+
export class AppRoutingModule {}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<app-navbar></app-navbar>
2+
23
<router-outlet></router-outlet>
4+
35
<app-icons></app-icons>

apps/docs/src/app/app.component.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
height: 100%;
55
display: block;
66
box-sizing: border-box;
7-
border-top: $navPrimaryHeight + $navSecondaryHeight + 2 solid transparent;
7+
border-top: $navPrimaryHeight + 1 solid transparent;
88

9-
/deep/ > * {
9+
/deep/ .page {
1010
background: $snow;
11+
padding: 20px;
1112
}
1213
}

apps/docs/src/app/app.component.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { Component } from '@angular/core';
22

33

44
@Component({
55
selector: 'app-root',
66
templateUrl: './app.component.html',
77
styleUrls: ['./app.component.scss']
88
})
9-
export class AppComponent implements OnInit {
10-
11-
constructor() { }
12-
13-
ngOnInit() { }
14-
15-
}
9+
export class AppComponent {}

apps/docs/src/app/app.module.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,34 @@ import { NxModule } from '@nrwl/nx';
44
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
55

66
import { AngularReactBrowserModule, registerElement } from '@angular-react/core';
7-
import { AngularReactFabricModule } from '@angular-react/fabric';
87

9-
import { AppComponent } from './app.component';
10-
import { ComponentsModule } from './components/components.module';
11-
import { ReactComponentsModule } from './react-components/react-components.module';
12-
import { AppRoutingModule } from './app-routing.module';
13-
import { ContainersModule } from './containers/containers.module';
8+
import { SharedModule } from './shared';
9+
import { ComponentsModule } from './components';
10+
import { LandingComponent, ComponentDocsModule, DocsModule, PerformanceModule } from './containers';
1411
import { MaterialModule } from './material.module';
12+
import { AppRoutingModule } from './app-routing.module';
13+
import { ReactComponentsModule } from './react-components';
14+
import { AppComponent } from './app.component';
15+
import { FabricModule } from './fabric.module';
1516

1617

1718
@NgModule({
1819
imports: [
1920
AngularReactBrowserModule,
2021
NxModule.forRoot(),
21-
AngularReactFabricModule,
2222
AppRoutingModule,
2323
BrowserAnimationsModule,
2424
MaterialModule,
25+
FabricModule,
2526

26-
ContainersModule,
27-
ComponentsModule,
27+
SharedModule,
2828
ReactComponentsModule,
29+
ComponentsModule,
30+
ComponentDocsModule,
31+
DocsModule,
32+
PerformanceModule,
2933
],
30-
declarations: [AppComponent],
34+
declarations: [AppComponent, LandingComponent],
3135
bootstrap: [AppComponent],
3236
schemas: [NO_ERRORS_SCHEMA]
3337
})
Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
11
import { RouterModule } from '@angular/router';
22
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
33
import { CommonModule } from '@angular/common';
4-
import { AngularReactFabricModule } from '@angular-react/fabric';
4+
5+
import { ReactComponentsModule } from '../react-components';
56

67
import { DotComponent } from './dot/dot.component';
7-
import { ReactComponentsModule } from '../react-components/react-components.module';
88
import { TriangleComponent } from './triangle/triangle.component';
99
import { NavbarComponent } from './navbar/navbar.component';
1010
import { MaterialModule } from '../material.module';
11-
import { SidebarComponent } from './sidebar/sidebar.component';
1211
import { IconsComponent } from './icons/icons.component';
12+
import { SubNavComponent } from './sub-nav/sub-nav.component';
13+
import { SharedModule } from '../shared';
14+
import { FabricModule } from '../fabric.module';
1315

1416

1517
const components = [
1618
DotComponent,
17-
TriangleComponent,
18-
NavbarComponent,
19-
SidebarComponent,
2019
IconsComponent,
20+
NavbarComponent,
21+
SubNavComponent,
22+
TriangleComponent,
2123
];
2224

2325
@NgModule({
24-
imports: [CommonModule, RouterModule, AngularReactFabricModule, ReactComponentsModule, MaterialModule],
26+
imports: [
27+
CommonModule,
28+
RouterModule,
29+
FabricModule,
30+
ReactComponentsModule,
31+
MaterialModule,
32+
SharedModule,
33+
],
2534
declarations: components,
2635
exports: components,
2736
})
2837
export class ComponentsModule { }
38+
39+
export {
40+
DotComponent,
41+
IconsComponent,
42+
NavbarComponent,
43+
TriangleComponent,
44+
}

apps/docs/src/app/components/icons/icons.component.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,16 @@
2020
/>
2121
</symbol>
2222

23+
<symbol id="microsoft" aria-labelledby="simpleicons-microsoft-icon" role="img" viewBox="0 0 24 24">
24+
<title id="simpleicons-microsoft-icon">Microsoft icon</title>
25+
<path d="M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zm12.6 0H12.6V0H24v11.4z"
26+
/>
27+
</symbol>
28+
29+
<symbol id="google" aria-labelledby="simpleicons-google-icon" role="img" viewBox="0 0 24 24">
30+
<title id="simpleicons-google-icon">Google icon</title>
31+
<path d="M12.24 10.285V14.4h6.806c-.275 1.765-2.056 5.174-6.806 5.174-4.095 0-7.439-3.389-7.439-7.574s3.345-7.574 7.439-7.574c2.33 0 3.891.989 4.785 1.849l3.254-3.138C18.189 1.186 15.479 0 12.24 0c-6.635 0-12 5.365-12 12s5.365 12 12 12c6.926 0 11.52-4.869 11.52-11.726 0-.788-.085-1.39-.189-1.989H12.24z"
32+
/>
33+
</symbol>
34+
2335
</svg>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components.module';

0 commit comments

Comments
 (0)