MCPcopy Create free account
hub / github.com/dailydotdev/apps / SignupWidget

Function SignupWidget

packages/shared/src/components/auth/SignupWidget.tsx:57–152  ·  view source on GitHub ↗
({
  title,
  description,
  trigger,
  dense,
  centered = false,
  className,
  children,
}: SignupWidgetProps)

Source from the content-addressed store, hash-verified

55 * as good as the thing the reader is already looking at.
56 */
57export function SignupWidget({
58 title,
59 description,
60 trigger,
61 dense,
62 centered = false,
63 className,
64 children,
65}: SignupWidgetProps): ReactElement {
66 const { showLogin } = useAuthContext();
67
68 return (
69 <div
70 className={classNames(
71 'flex flex-col',
72 !dense && 'rounded-16 border border-border-subtlest-tertiary',
73 !dense && !centered && 'p-4',
74 centered &&
75 'relative isolate items-center overflow-hidden bg-background-subtle px-5 py-8 text-center tablet:px-8 tablet:py-10',
76 className,
77 )}
78 >
79 {centered && (
80 <div
81 aria-hidden
82 className="pointer-events-none absolute inset-x-0 top-0 -z-1 h-40 bg-gradient-to-b from-theme-overlay-active-cabbage to-transparent"
83 />
84 )}
85 <style>
86 {`@keyframes signup-widget-gradient-shift {
87 0% { background-position: 0% 50%; }
88 50% { background-position: 100% 50%; }
89 100% { background-position: 0% 50%; }
90 }`}
91 </style>
92 <h3
93 className={classNames(
94 'font-bold',
95 !centered && (dense ? 'typo-callout' : 'typo-title3'),
96 centered && 'max-w-lg text-balance typo-title2 tablet:typo-title1',
97 )}
98 style={gradientStyle}
99 >
100 {title}
101 </h3>
102 <p
103 className={classNames(
104 'text-text-tertiary',
105 !centered && (dense ? 'mt-1 typo-caption1' : 'mt-2 typo-footnote'),
106 centered && 'mt-3 max-w-sm text-balance typo-callout',
107 )}
108 >
109 {description}
110 </p>
111 {children}
112 <div
113 className={classNames(
114 centered && 'mt-6 w-full max-w-[26.25rem]',

Callers

nothing calls this directly

Calls 1

useAuthContextFunction · 0.90

Tested by

no test coverage detected