mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-07 22:55:08 +02:00
27 lines
589 B
TypeScript
27 lines
589 B
TypeScript
"use client";
|
|
|
|
import { useLicenseStatusContext } from "@app/hooks/useLicenseStatusContext";
|
|
|
|
type BrandedAuthSurfaceProps = {
|
|
primaryColor?: string | null;
|
|
children: React.ReactNode;
|
|
};
|
|
|
|
export default function BrandedAuthSurface({
|
|
primaryColor,
|
|
children
|
|
}: BrandedAuthSurfaceProps) {
|
|
const { isUnlocked } = useLicenseStatusContext();
|
|
|
|
return (
|
|
<div
|
|
style={{
|
|
// @ts-expect-error CSS variable
|
|
"--primary": isUnlocked() ? primaryColor : null
|
|
}}
|
|
>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|