Skip to content

Commit 62791c7

Browse files
authored
feat(platform): Add ask ai button (#12646)
1 parent e520240 commit 62791c7

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

src/components/header.tsx

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client';
22

3-
import {Fragment} from 'react';
43
import {HamburgerMenuIcon} from '@radix-ui/react-icons';
54
import Image from 'next/image';
65
import Link from 'next/link';
@@ -76,18 +75,16 @@ export function Header({
7675
/>
7776
</div>
7877
)}
79-
<div className="hidden lg-xl:flex justify-end flex-1 space-x-2 items-center min-w-fit">
78+
<div className="hidden lg-xl:flex justify-end flex-1 gap-6 items-center min-w-fit">
8079
<NavLink href="https://sentry.io/changelog/">Changelog</NavLink>
8180
<NavLink href="https://try.sentry-demo.com/demo/start/">Sandbox</NavLink>
82-
<Fragment>
83-
<NavLink href="https://sentry.io/">Go to Sentry</NavLink>
84-
<NavLink
85-
href="https://sentry.io/signup/"
86-
className="transition-all duration-300 ease-in-out hover:bg-gradient-to-r hover:from-[#fa7faa] hover:via-[#ff9691] hover:to-[#ffb287]"
87-
>
88-
Get Started
89-
</NavLink>
90-
</Fragment>
81+
<NavLink href="https://sentry.io/">Go to Sentry</NavLink>
82+
<NavLink
83+
href="https://sentry.io/signup/"
84+
className="transition-all duration-300 ease-in-out hover:bg-gradient-to-r hover:from-[#fa7faa] hover:via-[#ff9691] hover:to-[#ffb287]"
85+
>
86+
Get Started
87+
</NavLink>
9188
<ThemeToggle />
9289
</div>
9390
<div className="lg-xl:hidden ml-auto">

src/components/search/index.tsx

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use client';
22

3-
import {useCallback, useEffect, useRef, useState} from 'react';
3+
import {Fragment, useCallback, useEffect, useRef, useState} from 'react';
44
import {ArrowRightIcon} from '@radix-ui/react-icons';
5+
import {Button} from '@radix-ui/themes';
56
import {captureException} from '@sentry/nextjs';
67
import {
78
Hit,
@@ -267,7 +268,7 @@ export function Search({
267268
<div className={styles['input-wrapper']}>
268269
<input
269270
type="text"
270-
placeholder="Search or ask a question"
271+
placeholder="Search Docs"
271272
aria-label="Search"
272273
className={styles['search-input']}
273274
value={query}
@@ -282,6 +283,22 @@ export function Search({
282283
{inputFocus ? 'esc' : '⌘K'}
283284
</kbd>
284285
</div>
286+
<Fragment>
287+
<span className="text-[var(--desatPurple10)] hidden md:inline">or</span>
288+
<Button
289+
asChild
290+
variant="ghost"
291+
color="gray"
292+
size="3"
293+
radius="medium"
294+
className="font-medium text-[var(--foreground)] py-2 px-3 uppercase cursor-pointer kapa-ai-class hidden md:flex"
295+
>
296+
<div>
297+
<MagicIcon />
298+
<span>Ask AI</span>
299+
</div>
300+
</Button>
301+
</Fragment>
285302
</div>
286303
{query.length >= 2 && inputFocus && (
287304
<div className={styles['sgs-search-results']}>

0 commit comments

Comments
 (0)