-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(design): create <daff-flat-button> variant (#2448)
- Loading branch information
Showing
9 changed files
with
181 additions
and
55 deletions.
There are no files selected for viewing
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 { BasicButtonComponent } from './basic-button/basic-button.component'; | ||
import { FlatButtonComponent } from './flat-button/flat-button.component'; | ||
import { IconButtonComponent } from './icon-button/icon-button.component'; | ||
import { RaisedButtonComponent } from './raised-button/raised-button.component'; | ||
import { SizeableButtonComponent } from './sizeable-button/sizeable-button.component'; | ||
import { StatusableButtonComponent } from './statusable-button/statusable-button.component'; | ||
import { StrokedButtonComponent } from './stroked-button/stroked-button.component'; | ||
import { UnderlineButtonComponent } from './underline-button/underline-button.component'; | ||
|
||
export const BUTTON_EXAMPLES = [ | ||
BasicButtonComponent, | ||
IconButtonComponent, | ||
RaisedButtonComponent, | ||
SizeableButtonComponent, | ||
StatusableButtonComponent, | ||
StrokedButtonComponent, | ||
UnderlineButtonComponent, | ||
FlatButtonComponent, | ||
]; |
13 changes: 13 additions & 0 deletions
13
libs/design/button/examples/src/flat-button/flat-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,13 @@ | ||
<button daff-flat-button>Default</button> | ||
<button daff-flat-button color="primary">Primary</button> | ||
<button daff-flat-button color="secondary">Secondary</button> | ||
<button daff-flat-button color="tertiary">Tertiary</button> | ||
<button daff-flat-button color="black">Black</button> | ||
<button daff-flat-button color="white">White</button> | ||
<button daff-flat-button color="theme">Theme</button> | ||
<button daff-flat-button color="theme-contrast">Theme Contrast</button> | ||
<button daff-flat-button><fa-icon [icon]="faChevronLeft" size="sm" daffPrefix></fa-icon>Button</button> | ||
<button daff-flat-button><fa-icon [icon]="faChevronRight" size="sm" daffSuffix></fa-icon>Button</button> | ||
<button daff-flat-button disabled>Disabled</button> | ||
<button daff-flat-button loading="true">Default</button> | ||
<a href="#" daff-flat-button>Link</a> |
26 changes: 26 additions & 0 deletions
26
libs/design/button/examples/src/flat-button/flat-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,26 @@ | ||
import { | ||
ChangeDetectionStrategy, | ||
Component, | ||
} from '@angular/core'; | ||
import { | ||
faChevronLeft, | ||
faChevronRight, | ||
} from '@fortawesome/free-solid-svg-icons'; | ||
|
||
@Component({ | ||
// eslint-disable-next-line @angular-eslint/component-selector | ||
selector: 'flat-button', | ||
templateUrl: './flat-button.component.html', | ||
styles: [` | ||
:host { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 8px; | ||
} | ||
`], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class FlatButtonComponent { | ||
faChevronLeft = faChevronLeft; | ||
faChevronRight = faChevronRight; | ||
} |
20 changes: 20 additions & 0 deletions
20
libs/design/button/examples/src/flat-button/flat-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 { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; | ||
|
||
import { DaffButtonModule } from '@daffodil/design'; | ||
|
||
import { FlatButtonComponent } from './flat-button.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
FlatButtonComponent, | ||
], | ||
exports: [ | ||
FlatButtonComponent, | ||
], | ||
imports: [ | ||
DaffButtonModule, | ||
FontAwesomeModule, | ||
], | ||
}) | ||
export class FlatButtonModule { } |
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 |
---|---|---|
@@ -1,34 +1,18 @@ | ||
import { BasicButtonComponent } from './basic-button/basic-button.component'; | ||
export { BUTTON_EXAMPLES } from './examples'; | ||
|
||
export { BasicButtonComponent } from './basic-button/basic-button.component'; | ||
export { BasicButtonModule } from './basic-button/basic-button.module'; | ||
import { IconButtonComponent } from './icon-button/icon-button.component'; | ||
export { FlatButtonComponent } from './flat-button/flat-button.component'; | ||
export { FlatButtonModule } from './flat-button/flat-button.module'; | ||
export { IconButtonComponent } from './icon-button/icon-button.component'; | ||
export { IconButtonModule } from './icon-button/icon-button.module'; | ||
import { RaisedButtonComponent } from './raised-button/raised-button.component'; | ||
export { RaisedButtonComponent } from './raised-button/raised-button.component'; | ||
export { RaisedButtonModule } from './raised-button/raised-button.module'; | ||
import { SizeableButtonComponent } from './sizeable-button/sizeable-button.component'; | ||
export { SizeableButtonComponent } from './sizeable-button/sizeable-button.component'; | ||
export { SizeableButtonModule } from './sizeable-button/sizeable-button.module'; | ||
import { StatusableButtonComponent } from './statusable-button/statusable-button.component'; | ||
export { StatusableButtonComponent } from './statusable-button/statusable-button.component'; | ||
export { StatusableButtonModule } from './statusable-button/statusable-button.module'; | ||
import { StrokedButtonComponent } from './stroked-button/stroked-button.component'; | ||
export { StrokedButtonComponent } from './stroked-button/stroked-button.component'; | ||
export { StrokedButtonModule } from './stroked-button/stroked-button.module'; | ||
import { UnderlineButtonComponent } from './underline-button/underline-button.component'; | ||
export { UnderlineButtonComponent } from './underline-button/underline-button.component'; | ||
export { UnderlineButtonModule } from './underline-button/underline-button.module'; | ||
|
||
export const BUTTON_EXAMPLES = [ | ||
BasicButtonComponent, | ||
IconButtonComponent, | ||
RaisedButtonComponent, | ||
SizeableButtonComponent, | ||
StatusableButtonComponent, | ||
StrokedButtonComponent, | ||
UnderlineButtonComponent, | ||
]; | ||
|
||
export { | ||
BasicButtonComponent, | ||
IconButtonComponent, | ||
RaisedButtonComponent, | ||
SizeableButtonComponent, | ||
StatusableButtonComponent, | ||
StrokedButtonComponent, | ||
UnderlineButtonComponent, | ||
}; |
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