Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

added field for dynamic bg color

Ashish Viradiya5f3f62e4d6ee
diff --git a/pages/branding.tsx b/pages/branding.tsx
index 718c6207..305a2cbb 100644
--- a/pages/branding.tsx
+++ b/pages/branding.tsx
@@ -335,6 +335,28 @@ export default function Branding() {
<div className="flex flex-col gap-2">
<Label htmlFor="accent-color">Background Color</Label>
<div className="flex space-x-1">
+ <Popover>
+ <PopoverTrigger>
+ <div
+ className="h-9 w-9 cursor-pointer rounded-md shadow-sm ring-1 ring-muted-foreground hover:ring-1 hover:ring-gray-300"
+ style={{ backgroundColor: accentColor }}
+ />
+ </PopoverTrigger>
+ <PopoverContent>
+ <HexColorPicker
+ color={accentColor}
+ onChange={setAccentColor}
+ />
+ </PopoverContent>
+ </Popover>
+ <HexColorInput
+ className="flex h-9 w-full rounded-md border-0 bg-background px-3 py-2 text-sm shadow-sm ring-1 ring-muted-foreground placeholder:text-muted-foreground focus:border-0 focus:ring-1 focus:ring-gray-300"
+ color={accentColor}
+ onChange={setAccentColor}
+ prefixed
+ />
+ </div>
+ <div className="mt-2 flex space-x-1">
<div
className="relative h-9 w-9 cursor-pointer rounded-md bg-white shadow-sm ring-1 ring-muted-foreground hover:ring-gray-300"
onClick={() => setAccentColor("#ffffff")}
diff --git a/pages/datarooms/[id]/branding/index.tsx b/pages/datarooms/[id]/branding/index.tsx
index 1b83b3dc..a3deab35 100644
--- a/pages/datarooms/[id]/branding/index.tsx
+++ b/pages/datarooms/[id]/branding/index.tsx
@@ -431,6 +431,28 @@ export default function DataroomBrandPage() {
</span>
</Label>
<div className="flex space-x-1">
+ <Popover>
+ <PopoverTrigger>
+ <div
+ className="h-9 w-9 cursor-pointer rounded-md shadow-sm ring-1 ring-muted-foreground hover:ring-1 hover:ring-gray-300"
+ style={{ backgroundColor: accentColor }}
+ />
+ </PopoverTrigger>
+ <PopoverContent>
+ <HexColorPicker
+ color={accentColor}
+ onChange={setAccentColor}
+ />
+ </PopoverContent>
+ </Popover>
+ <HexColorInput
+ className="flex h-9 w-full rounded-md border-0 bg-background px-3 py-2 text-sm shadow-sm ring-1 ring-muted-foreground placeholder:text-muted-foreground focus:border-0 focus:ring-1 focus:ring-gray-300"
+ color={accentColor}
+ onChange={setAccentColor}
+ prefixed
+ />
+ </div>
+ <div className="mt-2 flex space-x-1">
<div
className="relative h-9 w-9 cursor-pointer rounded-md bg-white shadow-sm ring-1 ring-muted-foreground hover:ring-gray-300"
onClick={() => setAccentColor("#ffffff")}