Skip to content

Commit

Permalink
SQ-66760 [FRONT] - Detalhes de comportamento e responsividade da tabe…
Browse files Browse the repository at this point in the history
…la de Acompanhamento de Postagem (#96)

* feat: add button collapse disable option

* feat: add tooltip to collapse button
  • Loading branch information
JoaoBianco authored Nov 6, 2024
1 parent d53ccb3 commit 0bfc78f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
</span>
<div
class="wrapper-icons"
[ngClass]="{
disabled: collapseButtonDisabled
}"
[ngStyle]="{
color: colorIcons,
'background-color': hoverIcon ? setHover(colorBackgroundIcon) : colorBackgroundIcon,
'font-size': fontSizeIcon,
height: heightIcon,
'line-height': heightIcon
}"
[tooltip]="collapseButtonTooltip"
(mouseover)="hoverIcon = true"
(mouseleave)="hoverIcon = false"
>
Expand Down
12 changes: 11 additions & 1 deletion src/components/sq-accordion/sq-collapse/sq-collapse.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ export class SqCollapseComponent {
*/
@Input() disabled?: boolean

/**
* Indicates whether just the collapse dropdown button is disabled.
*/
@Input() collapseButtonDisabled?: boolean

/**
* The tooltip for the collapse button.
*/
@Input() collapseButtonTooltip?: string

/**
* The color scheme of the collapse component.
*/
Expand Down Expand Up @@ -133,7 +143,7 @@ export class SqCollapseComponent {
* Toggles the state of the collapse component.
*/
public async toggleCollapse() {
if (!this.disabled && !this.loading && !this.opening) {
if (!this.disabled && !this.collapseButtonDisabled && !this.loading && !this.opening) {
this.opening = this.wrapper?.nativeElement?.clientHeight + 'px'
clearTimeout(this.timeout)
this.timeout = setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@squidit/ngx-css",
"version": "1.3.62",
"version": "1.3.63",
"peerDependencies": {
"@angular/common": ">=15.0.0",
"@angular/cdk": ">=15.0.0",
Expand Down

0 comments on commit 0bfc78f

Please sign in to comment.