mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 11:22:25 +00:00
Refactor floating panel styling hooks
This commit is contained in:
1 parent
ae932cb968
commit
e614acdee2
10 files changed
+268
-57
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { normalizeDesignSystemContext } from "../../designSystem.js";
|
||||
import positionFloatingPanel from "../utils/positionFloatingPanel.js";
|
||||
import { createFloatingPanelStyles } from "../utils/floatingPanelStyles.js";
|
||||
|
||||
export class VideoCard {
|
||||
constructor({
|
||||
@@ -661,6 +662,7 @@ export class VideoCard {
|
||||
|
||||
this.settingsButton = button;
|
||||
this.settingsDropdown = dropdown;
|
||||
this.settingsDropdownStyles = createFloatingPanelStyles(dropdown);
|
||||
this.settingsDropdownPositioner = positionFloatingPanel(
|
||||
button,
|
||||
dropdown,
|
||||
@@ -669,6 +671,7 @@ export class VideoCard {
|
||||
alignment: "end",
|
||||
offset: 8,
|
||||
viewportPadding: 16,
|
||||
styles: this.settingsDropdownStyles,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -873,11 +876,13 @@ export class VideoCard {
|
||||
|
||||
this.moreMenuButton = button;
|
||||
this.moreMenu = dropdown;
|
||||
this.moreMenuStyles = createFloatingPanelStyles(dropdown);
|
||||
this.moreMenuPositioner = positionFloatingPanel(button, dropdown, {
|
||||
placement: "bottom",
|
||||
alignment: "end",
|
||||
offset: 8,
|
||||
viewportPadding: 16,
|
||||
styles: this.moreMenuStyles,
|
||||
});
|
||||
|
||||
return wrapper;
|
||||
|
||||
Reference in new issue
Block a user