GustavoCostaW / ngc-float-button

Google Material Design Float Button - Implementation for Angular v4+. Demo: http://bit.ly/2yIya2f
MIT License
58 stars 23 forks source link

Add disabled state to the individual items #9

Closed duck-nukem closed 6 years ago

duck-nukem commented 7 years ago

Hi!

Awesome work with this, thanks for putting it together in the first place!

I think it could be enhanced with adding an attribute to the ngc-float-item-buttons, so it could be toggled from the Component.

This works with the current version:

HTML

      <ngc-float-item-button
        icon="delete"
        content="{{ 'ACTIONS.DELETE' | translate }}"
        [ngClass]="{'disabled-fab-button': !isAnyRowSelected()}"
        (click)="deleteSelected()">
      </ngc-float-item-button>

CSS

.disabled-fab-button {
  pointer-events: none;
}

.disabled-fab-button ::ng-deep .fab-item {
  background-color: lightgray;
}
GustavoCostaW commented 7 years ago

hey @kreatemore thx for the issue, I didn't understand, what's the new attribute that you talk about?

duck-nukem commented 6 years ago

Hey @GustavoCostaW sorry for disappearing, I've added a PR with the changes I had in mind. If you have time, please review it.

GustavoCostaW commented 6 years ago

@kreatemore hey, thank you for the PR, I added some comments there.