@@ -2,17 +2,56 @@ import type { ThemeColors } from "./useEmbedTheme";
22
33interface Props {
44 theme ?: ThemeColors ;
5+ variant ?: "overlay" | "inline" ;
6+ size ?: number ;
57}
68
7- export default function BrandingBadge ( { theme } : Props ) {
9+ const HREF = "https://livedot.dev?utm_source=embed&utm_medium=branding&utm_campaign=powered_by" ;
10+
11+ export default function BrandingBadge ( { theme, variant = "overlay" , size = 1 } : Props ) {
812 const bg = theme ?. bg ?? "rgba(10, 10, 10, 0.78)" ;
913 const border = theme ?. border ?? "rgba(255, 255, 255, 0.12)" ;
1014 const text = theme ?. text ?? "#fafafa" ;
11- const textSecondary = theme ?. brandingText ?? "rgba(255, 255, 255, 0.72)" ;
15+ const brandingText = theme ?. brandingText ?? "rgba(255, 255, 255, 0.72)" ;
16+ const brandingBg = theme ?. brandingBg ?? "rgba(255, 255, 255, 0.06)" ;
17+ const brandingBorder = theme ?. brandingBorder ?? "rgba(255, 255, 255, 0.08)" ;
18+
19+ if ( variant === "inline" ) {
20+ return (
21+ < a
22+ href = { HREF }
23+ target = "_blank"
24+ rel = "noreferrer"
25+ aria-label = "Powered by Livedot"
26+ style = { {
27+ display : "inline-flex" ,
28+ alignItems : "center" ,
29+ gap : 8 * size ,
30+ padding : `0 ${ 10 * size } px` ,
31+ height : 28 * size ,
32+ borderRadius : 999 ,
33+ background : brandingBg ,
34+ border : `1px solid ${ brandingBorder } ` ,
35+ flexShrink : 0 ,
36+ textDecoration : "none" ,
37+ } }
38+ >
39+ < img
40+ src = "/logo.svg"
41+ alt = ""
42+ aria-hidden = "true"
43+ style = { { width : 18 * size , height : 18 * size , borderRadius : 6 * size , display : "block" } }
44+ />
45+ < span style = { { fontSize : 11 * size , fontWeight : 600 , color : brandingText , whiteSpace : "nowrap" } } >
46+ Powered by Livedot
47+ </ span >
48+ </ a >
49+ ) ;
50+ }
1251
1352 return (
1453 < a
15- href = "https://livedot.dev"
54+ href = { HREF }
1655 target = "_blank"
1756 rel = "noreferrer"
1857 aria-label = "Powered by Livedot"
@@ -39,8 +78,8 @@ export default function BrandingBadge({ theme }: Props) {
3978 aria-hidden = "true"
4079 style = { { width : 18 , height : 18 , borderRadius : 5 , flexShrink : 0 } }
4180 />
42- < span style = { { fontSize : 11 , lineHeight : 1 , color : textSecondary } } > Powered by</ span >
43- < span style = { { fontSize : 12 , lineHeight : 1 , fontWeight : 700 , letterSpacing : "-0.02em" } } > { " " } livedot</ span >
81+ < span style = { { fontSize : 11 , lineHeight : 1 , color : brandingText } } > Powered by</ span >
82+ < span style = { { fontSize : 12 , lineHeight : 1 , fontWeight : 700 , letterSpacing : "-0.02em" } } > livedot</ span >
4483 </ a >
4584 ) ;
4685}
0 commit comments