Skip to content

Commit

Permalink
feat(button): Add first version button
Browse files Browse the repository at this point in the history
  • Loading branch information
silviohf committed Jun 26, 2017
1 parent 8f6208d commit 5bc1a3a
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 2 deletions.
1 change: 1 addition & 0 deletions demo/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { HomeComponent } from "app/home/home.component";
RouterModule.forRoot([
{path: '', component: HomeComponent},
{path: 'input', loadChildren: './components/input/inputdemo.module#InputDemoModule'},
{path: 'button', loadChildren: './components/button/buttondemo.module#ButtonDemoModule'}
])
],
exports: [RouterModule]
Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<div class="col-sm-3 col-md-2 menu-container">
<ul class="menu">
<li routerLink="input" routerLinkActive="active"><i class="ion-android-arrow-dropright"></i>Input</li>
<li routerLink="button" routerLinkActive="active"><i class="ion-android-arrow-dropright"></i>Button</li>
<li><i class="ion-android-arrow-dropright" routerLinkActive="active"></i>MultiSelect</li>
<li><i class="ion-android-arrow-dropright" routerLinkActive="active"></i>Tooltip</li>
<li><i class="ion-android-arrow-dropright" routerLinkActive="active"></i>DataGrid</li>
<li><i class="ion-android-arrow-dropright" routerLinkActive="active"></i>Button</li>
</ul>
<!--<span class="git-logo"><img width="40" height="40" title="Fork me on GitHub" src="../assets/giticon.png"></span>-->
</div>
Expand Down
16 changes: 16 additions & 0 deletions demo/src/app/components/button/buttondemo-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'
import { ButtonDemo } from './buttondemo.component';

@NgModule( {
imports: [
RouterModule.forChild( [
{ path: '', component: ButtonDemo }
] )
],
exports: [
RouterModule
]
} )
export class ButtonDemoRoutingModule {
}
42 changes: 42 additions & 0 deletions demo/src/app/components/button/buttondemo.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<div class="header-title-demo">
<h1 class="title">Button</h1>
<p class="text-content">There's a lot of ways to create an input using Truly UI. Below, are some of those.</p>
</div>
<hr>
<div class="showcase">
</div>
<hr>
<div class="setup">
<h3 class="title">Properties</h3>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
<th>Options</th>
</tr>
</thead>
<!--<tbody *ngFor="let item of dataTableProperties; let i = index">-->
<!--<tr>-->
<!--<td><b>{{ item.name }}</b></td>-->
<!--<td><span class="badge">{{ item.type }}</span></td>-->
<!--<td><code>{{ item.default }}</code></td>-->
<!--<td>{{ item.description }}</td>-->
<!--<td><code> {{ item.options }} </code></td>-->
<!--</tr>-->
<!--</tbody>-->
</table>
</div>
<hr>
<!--<h3 class="title">Events</h3>-->
</div>
<div class="examples">
<h3 class="title">Examples</h3>
<div class="group-component">
<h5 class="title">Basic</h5>

</div>
</div>
Empty file.
15 changes: 15 additions & 0 deletions demo/src/app/components/button/buttondemo.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component } from '@angular/core';


@Component( {
selector: 'app-button',
templateUrl: './buttondemo.component.html',
styleUrls: [ './buttondemo.component.scss' ]
} )
export class ButtonDemo {


constructor() {
}

}
26 changes: 26 additions & 0 deletions demo/src/app/components/button/buttondemo.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { CommonModule } from '@angular/common';
import { NgModule } from "@angular/core";
import { FormsModule } from '@angular/forms';

import { ButtonDemo } from "./buttondemo.component";
import { ButtonModule } from '../../../../../src/button';
import { ButtonDemoRoutingModule } from "./buttondemo-routing.module";
import { HighlightJsModule } from 'ngx-highlight-js';


@NgModule({
declarations: [
ButtonDemo
],
imports:[
ButtonDemoRoutingModule,
ButtonModule,
CommonModule,
FormsModule,
HighlightJsModule
],
exports: [
ButtonDemo
]
})
export class ButtonDemoModule {}
2 changes: 1 addition & 1 deletion demo/src/app/components/input/inputdemo.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { CommonModule } from '@angular/common';
import { NgModule } from "@angular/core";
import { FormsModule } from '@angular/forms';

import { InputDemo } from "./inputdemo.component";
import { InputModule } from '../../../../../src/input';
import { InputDemoRoutingModule } from "./inputdemo-routing.module";
import { CommonModule } from '@angular/common';
import { HighlightJsModule } from 'ngx-highlight-js';


Expand Down
4 changes: 4 additions & 0 deletions src/button/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="tl-button-box">

</div>

1 change: 1 addition & 0 deletions src/button/button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../core/core";
32 changes: 32 additions & 0 deletions src/button/button.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
MIT License
Copyright (c) 2017 Temainfo Sistemas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
import { Component } from '@angular/core';

@Component( {
selector: 'tl-button',
templateUrl: './button.html',
styleUrls: ['./button.scss']
})
export class TlButton {


}
19 changes: 19 additions & 0 deletions src/button/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { TlButton } from './button';

export * from './button';

@NgModule({
imports: [
CommonModule,
],
declarations: [
TlButton
],
exports: [
TlButton
]
})
export class ButtonModule {}
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@ import { NgModule } from '@angular/core';

import { DatatableModule } from './datatable/index';
import { InputModule } from './input/index';
import { ButtonModule } from './button/index';
import { MultiselectModule } from './multiselect/index';
import { TooltipModule } from './tooltip/index';

export * from './datatable/index';
export * from './input/index';
export * from './button/index';
export * from './multiselect/index';
export * from './tooltip/index';

@NgModule({
imports: [
ButtonModule,
DatatableModule,
InputModule,
MultiselectModule,
Expand Down

0 comments on commit 5bc1a3a

Please sign in to comment.