In a large project we decided to create a button component. We added Input for most of the things that we needed and at the end it summed to 20 Inputs.
@Input() body: string;
@Input() chevron: "right" | "left" | "none" = "none";
@Input() chevronDown: "right" | "left" | "none" = "none";
@Input() padding: "small" | "normal" = "normal";
@Input() shade: "dark" | "light" = "dark";
@Input() active: boolean = false;
@Input() color: "primary" | "transparent" | "danger" | "warning" | "secondary" | "success" = "primary";
@Input() buttonType: "button" | "menu" | "reset" | "submit" = "button";
@Input() disabled: boolean = false;
@Input() icon: "plus" | "three-dots" | "x" | "chevron-down" | "chevron-up" | "pen" | "grid" | "funnel";
@Input() helper: string;
@Input() fontSize: "x-small" | "small" | "normal" = "normal";
@Input() textAlign: "left" | "center" | "right" = "left";
@Input() spinner: "left" | "right" | "none" = "none";
@Input() disableWhenSpin: boolean = true;
@Input() fontWeight: number = 400;
@Input() width: "full" | "normal" = "normal";
@Input() hiddenAfter: "md" | "none" = "none";
@Input() hiddenBefore: "md" | "none" = "none";
@Input() checkbox = false;
@Input() checked = false;
And we added icons inside template and conditionally rendered them with inputs. But mostly we don't give inputs conditionally:
<app-button body="Cancel"
padding="small"
color="transparent"
(onClick)="cancelEmitter.emit()"></app-button>
So event we don't give inputs conditionally (like color insead of [color]) is it bad to add this much input and html to component. And also is Angular removes unnessecary html and js logic according to inputs, if it is the case this should not be a problem too?