11import { useClerk } from '@clerk/shared/react' ;
22import type { __internal_EnableOrganizationsPromptProps } from '@clerk/shared/types' ;
33// eslint-disable-next-line no-restricted-imports
4- import { css , type Theme } from '@emotion/react' ;
4+ import { css , type SerializedStyles , type Theme } from '@emotion/react' ;
55import { forwardRef , useId , useMemo , useRef , useState } from 'react' ;
66
77import { Modal } from '@/ui/elements/Modal' ;
@@ -211,12 +211,13 @@ const EnableOrganizationsPromptInternal = ({
211211
212212 < Flex
213213 direction = 'col'
214+ align = 'start'
214215 sx = { t => ( {
215216 gap : t . sizes . $0x5 ,
216217 } ) }
217218 >
218219 { isEnabled ? (
219- < span
220+ < p
220221 css = { [
221222 basePromptElementStyles ,
222223 css `
@@ -229,28 +230,18 @@ const EnableOrganizationsPromptInternal = ({
229230 >
230231 The Organizations feature has been enabled for your application. A default organization named "My
231232 Organization" was created automatically. You can manage or rename it in your{ ' ' }
232- < a
233- css = { [
234- basePromptElementStyles ,
235- css `
236- color : # a8a8ff ;
237- font-size : inherit;
238- font-weight : 500 ;
239- line-height : 1.3 ;
240- font-size : 0.8125rem ;
241- ` ,
242- ] }
233+ < Link
243234 href = { organizationsDashboardUrl }
244235 target = '_blank'
245236 rel = 'noopener noreferrer'
246237 >
247238 dashboard
248- </ a >
239+ </ Link >
249240 .
250- </ span >
241+ </ p >
251242 ) : (
252243 < >
253- < span
244+ < p
254245 css = { [
255246 basePromptElementStyles ,
256247 css `
@@ -277,25 +268,15 @@ const EnableOrganizationsPromptInternal = ({
277268 </ code > { ' ' }
278269 { isComponent ? 'component' : 'hook' } , you'll need to enable the Organizations feature for your
279270 app first.
280- </ span >
271+ </ p >
281272
282- < a
283- css = { [
284- basePromptElementStyles ,
285- css `
286- color : # a8a8ff ;
287- font-size : inherit;
288- font-weight : 500 ;
289- line-height : 1.5 ;
290- font-size : 0.8125rem ;
291- ` ,
292- ] }
273+ < Link
293274 href = 'https://clerk.com/docs/guides/organizations/overview'
294275 target = '_blank'
295276 rel = 'noopener noreferrer'
296277 >
297278 Learn more about Organizations.
298- </ a >
279+ </ Link >
299280 </ >
300281 ) }
301282 </ Flex >
@@ -596,3 +577,28 @@ const Switch = forwardRef<HTMLInputElement, SwitchProps>(
596577 ) ;
597578 } ,
598579) ;
580+
581+ const Link = forwardRef < HTMLAnchorElement , React . ComponentProps < 'a' > & { css ?: SerializedStyles } > (
582+ ( { children, css : cssProp , ...props } , ref ) => {
583+ return (
584+ < a
585+ ref = { ref }
586+ { ...props }
587+ css = { [
588+ basePromptElementStyles ,
589+ css `
590+ color : # a8a8ff ;
591+ font-size : inherit;
592+ font-weight : 500 ;
593+ line-height : 1.3 ;
594+ font-size : 0.8125rem ;
595+ min-width : 0 ;
596+ ` ,
597+ cssProp ,
598+ ] }
599+ >
600+ { children }
601+ </ a >
602+ ) ;
603+ } ,
604+ ) ;
0 commit comments