Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/components/AiBadge/AiBadge.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.badge {
display: inline-flex;
align-items: center;
gap: 3px;
padding: 2px 5px;
background-color: var(--blue-600, #375bd2);
border-radius: 4px;
font-size: 10px;
font-weight: 700;
color: #fff;
letter-spacing: 0.4px;
line-height: 1;
flex-shrink: 0;
vertical-align: middle;
user-select: none;
}

.sparkle {
flex-shrink: 0;
opacity: 0.9;
}
29 changes: 29 additions & 0 deletions src/components/AiBadge/AiBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import styles from "./AiBadge.module.css"

interface AiBadgeProps {
className?: string
}

export function AiBadge({ className }: AiBadgeProps) {
return (
<span className={`${styles.badge} ${className || ""}`} aria-label="Includes AI features">
<svg
className={styles.sparkle}
width="8"
height="8"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M12.06 2.06L13 0L13.94 2.06L16 3L13.94 3.94L13 6L12.06 3.94L10 3L12.06 2.06ZM4.47 7.47L6.5 3L8.53 7.47L13 9.5L8.53 11.53L6.5 16L4.47 11.53L0 9.5L4.47 7.47Z"
fill="currentColor"
/>
</svg>
AI
</span>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
}

.label {
display: block;
display: flex;
align-items: center;
gap: 6px;
font-size: 0.75rem;
font-weight: 500;
color: var(--gray-600, #4b5563);
Expand Down
4 changes: 2 additions & 2 deletions src/components/RightSidebar/CopyPageLink/CopyPageLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { extractPageContent, copyToClipboard } from "./contentExtractor.js"
import { MarkdownPreviewModal } from "./MarkdownPreviewModal.js"
import type { CopyPageLinkProps, CopyAction } from "./types.js"
import styles from "./CopyPageLink.module.css"

import { AiBadge } from "../../AiBadge/AiBadge.js"
export function CopyPageLink({ className }: CopyPageLinkProps) {
const [isDropdownOpen, setIsDropdownOpen] = useState(false)
const [isModalOpen, setIsModalOpen] = useState(false)
Expand Down Expand Up @@ -169,7 +169,7 @@ Please ask me to paste it now. After I paste, please:
<>
<div className={`${styles.container} ${className || ""}`}>
<label className={styles.label} htmlFor="copy-page-trigger">
Copy Page
Use with LLMs <AiBadge />
</label>
<button
id="copy-page-trigger"
Expand Down
Loading