Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 5x 5x 5x 5x 5x 5x 7x 7x 1x | import { Component, OnInit } from "@angular/core"
import { Store } from "@ngrx/store"
import { Observable } from "rxjs"
import { CcState } from "../../../../codeCharta.model"
import { toggleIsSearchPanelPinned } from "../../../../state/store/appSettings/isSearchPanelPinned/isSearchPanelPinned.actions"
import { isSearchPanelPinnedSelector } from "../../../../state/store/appSettings/isSearchPanelPinned/isSearchPanelPinned.selector"
import { NgClass, AsyncPipe } from "@angular/common"
@Component({
selector: "cc-thumb-tack-button",
templateUrl: "./thumbTackButton.component.html",
styleUrls: ["./thumbTackButton.component.scss"],
standalone: true,
imports: [NgClass, AsyncPipe]
})
export class ThumbTackButtonComponent implements OnInit {
isSearchPanelPinned$: Observable<boolean>
constructor(private store: Store<CcState>) {}
ngOnInit(): void {
this.isSearchPanelPinned$ = this.store.select(isSearchPanelPinnedSelector)
}
onClick() {
this.store.dispatch(toggleIsSearchPanelPinned())
}
}
|