mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Add design system feature flag and runtime integration
This commit is contained in:
1 parent
8288824872
commit
8265f9e2de
42 files changed
+359
-23
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { normalizeDesignSystemContext } from "../../designSystem.js";
|
||||
|
||||
export class VideoCard {
|
||||
constructor({
|
||||
document: doc,
|
||||
@@ -16,7 +18,8 @@ export class VideoCard {
|
||||
state = {},
|
||||
ensureGlobalMoreMenuHandlers,
|
||||
onRequestCloseAllMenus,
|
||||
nsfwContext = null
|
||||
nsfwContext = null,
|
||||
designSystem = null,
|
||||
} = {}) {
|
||||
if (!doc) {
|
||||
throw new Error("VideoCard requires a document reference.");
|
||||
@@ -76,6 +79,8 @@ export class VideoCard {
|
||||
? onRequestCloseAllMenus
|
||||
: null;
|
||||
|
||||
this.designSystem = normalizeDesignSystemContext(designSystem);
|
||||
|
||||
this.nsfwContext = {
|
||||
isNsfw: Boolean(nsfwContext?.isNsfw),
|
||||
allowNsfw: nsfwContext?.allowNsfw !== false,
|
||||
|
||||
Reference in new issue
Block a user