-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(icon-button): create component samples (#3412)
- Loading branch information
1 parent
2cfe847
commit fe7e52a
Showing
82 changed files
with
562 additions
and
91 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,101 @@ | ||
import {IgxButtonGroupModule, | ||
IgxButtonModule, | ||
IgxIconButtonDirective, | ||
IgxIconModule, | ||
IgxRippleModule} from 'igniteui-angular'; | ||
import {AppModuleConfig, Config, IConfigGenerator} from 'igniteui-live-editing' | ||
export class IconButtonConfigGenerator implements IConfigGenerator { | ||
public generateConfigs(): Config[] { | ||
const configs = new Array<Config>(); | ||
|
||
// icon button overview | ||
configs.push(new Config({ | ||
component: 'IconButtonOverviewComponent', | ||
appModuleConfig: new AppModuleConfig({ | ||
imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonOverviewComponent'], | ||
ngDeclarations: ['IconButtonOverviewComponent'], | ||
ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] | ||
}), | ||
shortenComponentPathBy: "/data-entries/icon-button/" | ||
})); | ||
|
||
// flat icon button | ||
configs.push(new Config({ | ||
component: 'FlatIconButtonComponent', | ||
appModuleConfig: new AppModuleConfig({ | ||
imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'FlatIconButtonComponent'], | ||
ngDeclarations: ['FlatIconButtonComponent'], | ||
ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] | ||
}), | ||
shortenComponentPathBy: "/data-entries/icon-button/" | ||
})); | ||
|
||
// contained icon button | ||
configs.push(new Config({ | ||
component: 'ContainedIconButtonComponent', | ||
appModuleConfig: new AppModuleConfig({ | ||
imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'ContainedIconButtonComponent'], | ||
ngDeclarations: ['ContainedIconButtonComponent'], | ||
ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] | ||
}), | ||
shortenComponentPathBy: "/data-entries/icon-button/" | ||
})); | ||
|
||
// outlined icon button | ||
configs.push(new Config({ | ||
component: 'OutlinedIconButtonComponent', | ||
appModuleConfig: new AppModuleConfig({ | ||
imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'OutlinedIconButtonComponent'], | ||
ngDeclarations: ['OutlinedIconButtonComponent'], | ||
ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] | ||
}), | ||
shortenComponentPathBy: "/data-entries/icon-button/" | ||
})); | ||
|
||
// disabled icon button | ||
configs.push(new Config({ | ||
component: 'DisabledIconButtonComponent', | ||
appModuleConfig: new AppModuleConfig({ | ||
imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'DisabledIconButtonComponent'], | ||
ngDeclarations: ['DisabledIconButtonComponent'], | ||
ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] | ||
}), | ||
shortenComponentPathBy: "/data-entries/icon-button/" | ||
})); | ||
|
||
// SVG icon button | ||
configs.push(new Config({ | ||
component: 'SVGIconButtonComponent', | ||
appModuleConfig: new AppModuleConfig({ | ||
imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'SVGIconButtonComponent'], | ||
ngDeclarations: ['SVGIconButtonComponent'], | ||
ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] | ||
}), | ||
shortenComponentPathBy: "/data-entries/icon-button/" | ||
})); | ||
|
||
// icon button styling | ||
configs.push(new Config({ | ||
component: 'IconButtonStylingComponent', | ||
appModuleConfig: new AppModuleConfig({ | ||
imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonStylingComponent'], | ||
ngDeclarations: ['IconButtonStylingComponent'], | ||
ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] | ||
}), | ||
shortenComponentPathBy: "/data-entries/icon-button/" | ||
})); | ||
|
||
// icon button size | ||
configs.push(new Config({ | ||
component: 'IconButtonSizeComponent', | ||
appModuleConfig: new AppModuleConfig({ | ||
imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonSizeComponent'], | ||
ngDeclarations: ['IconButtonSizeComponent'], | ||
ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] | ||
}), | ||
shortenComponentPathBy: "/data-entries/icon-button/" | ||
})); | ||
|
||
return configs; | ||
} | ||
} |
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
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
2 changes: 1 addition & 1 deletion
2
src/app/data-entries/buttons/buttons-disabled-sample/buttons-disabled-sample.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 |
---|---|---|
@@ -1 +1 @@ | ||
<button class="btn" igxButton="raised" [disabled]="'true'">Disabled</button> | ||
<button class="btn" igxButton="contained" [disabled]="'true'">Disabled</button> |
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
2 changes: 1 addition & 1 deletion
2
src/app/data-entries/buttons/buttons-sample-5/buttons-sample-5.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 |
---|---|---|
@@ -1 +1 @@ | ||
<button igxButton="contained" class="btn">Raised</button> | ||
<button igxButton="contained" class="btn">Contained</button> |
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
Oops, something went wrong.