55 useEffect ,
66} from "react" ;
77import { useGlobalConnect } from "./GlobalConnectProvider" ;
8+ import { styles } from "../utils/componentStyles" ;
89
910export default function ConnectLinkDemo ( ) {
1011 const {
@@ -38,8 +39,8 @@ export default function ConnectLinkDemo() {
3839 // No token data or connect_link_url - need to generate a token
3940 if ( ! tokenData ?. connect_link_url ) {
4041 return (
41- < div className = "border border-gray-200 rounded-md p-4 mt-4" >
42- < p className = " text-sm text-gray-500" >
42+ < div className = { ` ${ styles . container } p-4` } >
43+ < p className = { styles . text . muted } >
4344 < a href = "/docs/connect/managed-auth/quickstart/#generate-a-short-lived-token" className = "font-semibold underline underline-offset-4 hover:decoration-2 decoration-brand/50" > Generate a token above</ a >
4445 { " " } to see a Connect Link URL here
4546 </ p >
@@ -48,18 +49,18 @@ export default function ConnectLinkDemo() {
4849 }
4950
5051 return (
51- < div className = "border rounded-md overflow-hidden mt-4" >
52- < div className = "bg-gray-100 border-b px-4 py-2 font-medium text-sm" >
52+ < div className = { styles . container } >
53+ < div className = { styles . header } >
5354 Connect Link URL
5455 </ div >
5556 < div className = "p-4" >
5657 < div className = "mb-4" >
5758 < label className = "flex items-center mb-4" >
58- < span className = "font-medium text-sm" > App to connect:</ span >
59+ < span className = { styles . label } > App to connect:</ span >
5960 < select
6061 value = { appSlug }
6162 onChange = { ( e ) => setAppSlug ( e . target . value ) }
62- className = "ml-2 p-1 border rounded text-sm"
63+ className = { styles . select }
6364 >
6465 < option value = "slack" > Slack</ option >
6566 < option value = "github" > GitHub</ option >
@@ -68,8 +69,8 @@ export default function ConnectLinkDemo() {
6869 </ label >
6970
7071 < div className = "mb-4" >
71- < div className = "p-3 bg-gray-50 border border-gray-200 rounded-md" >
72- < code className = "text-sm break-all" > { connectLinkUrl } </ code >
72+ < div className = { styles . codeDisplay } >
73+ < code className = { styles . codeText } > { connectLinkUrl } </ code >
7374 </ div >
7475 </ div >
7576 </ div >
@@ -79,7 +80,7 @@ export default function ConnectLinkDemo() {
7980 href = { connectLinkUrl }
8081 target = "_blank"
8182 rel = "noopener noreferrer"
82- className = "px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors disabled:opacity-50 font-medium text-sm inline-flex items-center"
83+ className = { ` ${ styles . primaryButton } inline-flex items-center` }
8384 >
8485 Open Connect Link
8586 < svg xmlns = "http://www.w3.org/2000/svg" className = "h-4 w-4 ml-1" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" >
@@ -91,7 +92,7 @@ export default function ConnectLinkDemo() {
9192 onClick = { ( ) => {
9293 navigator . clipboard . writeText ( connectLinkUrl ) ;
9394 } }
94- className = "px-4 py-2 bg-gray-100 border border-gray-300 text-gray-700 rounded-md hover:bg-gray-200 transition-colors font-medium text-sm inline-flex items-center"
95+ className = { styles . secondaryButton }
9596 >
9697 Copy URL
9798 < svg xmlns = "http://www.w3.org/2000/svg" className = "h-4 w-4 ml-1" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" >
@@ -100,14 +101,14 @@ export default function ConnectLinkDemo() {
100101 </ button >
101102 </ div >
102103
103- < div className = " mt-4 text-sm text-gray-600" >
104+ < div className = { ` mt-4 ${ styles . text . normal } ` } >
104105 < p >
105106 This URL contains a Connect Token that expires in 4 hours
106- < strong > or after it's used once</ strong > .
107+ < strong className = { styles . text . strong } > or after it's used once</ strong > .
107108 You can send this link to your users via email, SMS, or chat.
108109 </ p >
109- < p className = " mt-2 text-xs text-gray-500" >
110- < strong > Note:</ strong > Connect tokens are single-use. After a successful connection,
110+ < p className = { ` mt-2 ${ styles . text . small } ` } >
111+ < strong className = { styles . text . strongMuted } > Note:</ strong > Connect tokens are single-use. After a successful connection,
111112 you'll need to generate a new token.
112113 </ p >
113114 </ div >
0 commit comments