-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds all files necessary for GoIconButtonComponent (#57)
* Adds all files necessary for GoIconButtonComponent Creates a component for button with icons with no text.
- Loading branch information
1 parent
27abdc9
commit 2102797
Showing
8 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
projects/go-lib/src/lib/components/go-icon-button/go-icon-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<button | ||
class="go-icon-button" | ||
(click)="clicked()" | ||
[disabled]="buttonDisabled" | ||
type="button" | ||
> | ||
<go-icon | ||
[icon]="buttonIcon" | ||
iconClass="go-icon--small" | ||
></go-icon> | ||
</button> |
19 changes: 19 additions & 0 deletions
19
projects/go-lib/src/lib/components/go-icon-button/go-icon-button.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@import '~@tangoe/gosheets/base/variables'; | ||
@import '~@tangoe/gosheets/base/mixins'; | ||
|
||
.go-icon-button { | ||
@include transition(background-color); | ||
|
||
background: $theme-light-bg; | ||
border: 0; | ||
border-radius: $global-radius--round; | ||
box-shadow: $global-box-shadow; | ||
color: $theme-light-color; | ||
cursor: pointer; | ||
display: inline-flex; | ||
padding: .5rem; | ||
|
||
&:hover { | ||
background-color: $theme-light-bg-hover; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
projects/go-lib/src/lib/components/go-icon-button/go-icon-button.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Component, EventEmitter, Input, Output } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'go-icon-button', | ||
templateUrl: './go-icon-button.component.html' | ||
}) | ||
export class GoIconButtonComponent { | ||
@Input() buttonDisabled: boolean; | ||
@Input() buttonIcon: string; | ||
|
||
@Output() handleClick = new EventEmitter(); | ||
|
||
public clicked(): void { | ||
this.handleClick.emit(); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
projects/go-lib/src/lib/components/go-icon-button/go-icon-button.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { GoIconModule } from '../go-icon/go-icon.module'; | ||
|
||
import { GoIconButtonComponent } from './go-icon-button.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
GoIconButtonComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
GoIconModule | ||
], | ||
exports: [ | ||
GoIconButtonComponent | ||
] | ||
}) | ||
export class GoIconButtonModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters