mirror of
https://github.com/bitwarden/browser
synced 2026-02-19 02:44:01 +00:00
28 lines
776 B
TypeScript
28 lines
776 B
TypeScript
import { CdkScrollable } from "@angular/cdk/scrolling";
|
|
import { ChangeDetectionStrategy, Component } from "@angular/core";
|
|
|
|
import { hasScrolledFrom } from "../utils/has-scrolled-from";
|
|
|
|
/**
|
|
* Body container for `bit-drawer`
|
|
*/
|
|
@Component({
|
|
selector: "bit-drawer-body",
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
imports: [],
|
|
host: {
|
|
class:
|
|
"tw-p-4 tw-pt-0 tw-flex-1 tw-overflow-auto tw-border-solid tw-border tw-border-transparent tw-transition-colors tw-duration-200",
|
|
"[class.tw-border-t-secondary-300]": "this.hasScrolledFrom().top",
|
|
},
|
|
hostDirectives: [
|
|
{
|
|
directive: CdkScrollable,
|
|
},
|
|
],
|
|
template: ` <ng-content></ng-content> `,
|
|
})
|
|
export class DrawerBodyComponent {
|
|
protected hasScrolledFrom = hasScrolledFrom();
|
|
}
|