Skip to content

Commit 5492bfb

Browse files
committed
add kapa button
1 parent 285691c commit 5492bfb

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

src/components/search/index.tsx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

33
import {Fragment, useCallback, useEffect, useRef, useState} from 'react';
4+
import {Button} from '@radix-ui/themes';
45
import {captureException} from '@sentry/nextjs';
56
import {
67
Hit,
@@ -20,7 +21,6 @@ import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';
2021
import styles from './search.module.scss';
2122

2223
import {Logo} from '../logo';
23-
import {NavLink} from '../navlink';
2424

2525
// https://stackoverflow.com/a/2117523/115146
2626
function uuidv4() {
@@ -282,28 +282,32 @@ export function Search({path, autoFocus, searchPlatforms = [], showChatBot}: Pro
282282
{showChatBot && (
283283
<Fragment>
284284
<span className="text-[var(--desatPurple10)] hidden md:inline">or</span>
285-
<NavLink
286-
href="https://docsbot.ai/chat/skFEy0qDC01GrRrZ7Crs/EPqsd8nu2XmKzWnd45tL"
287-
target="_blank"
288-
style={{textWrap: 'nowrap'}}
289-
className="hidden md:flex items-center"
285+
<Button
286+
asChild
287+
variant="ghost"
288+
color="gray"
289+
size="3"
290+
radius="medium"
291+
className="font-medium text-[var(--foreground)] py-2 px-3 uppercase cursor-pointer kapa-ai-class"
290292
>
291-
<svg
292-
xmlns="http://www.w3.org/2000/svg"
293-
fill="none"
294-
viewBox="0 0 24 24"
295-
strokeWidth={1.5}
296-
stroke="currentColor"
297-
className="size-5"
298-
>
299-
<path
300-
strokeLinecap="round"
301-
strokeLinejoin="round"
302-
d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"
303-
/>
304-
</svg>
305-
<span>Ask AI</span>
306-
</NavLink>
293+
<div>
294+
<svg
295+
xmlns="http://www.w3.org/2000/svg"
296+
fill="none"
297+
viewBox="0 0 24 24"
298+
strokeWidth={1.5}
299+
stroke="currentColor"
300+
className="size-5"
301+
>
302+
<path
303+
strokeLinecap="round"
304+
strokeLinejoin="round"
305+
d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"
306+
/>
307+
</svg>
308+
<span>Ask AI</span>
309+
</div>
310+
</Button>
307311
</Fragment>
308312
)}
309313
</div>

0 commit comments

Comments
 (0)