Skip to content

Commit b1d8b1a

Browse files
committed
fix: restore ContactButton for enterprise blog post, export WIKIPEDIA_PAGE_CONTENT_OUTPUT_PROPERTIES
1 parent 9e7f80e commit b1d8b1a

2 files changed

Lines changed: 52 additions & 1 deletion

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
'use client'
2+
3+
import { useState } from 'react'
4+
import { ArrowRight, ChevronRight } from 'lucide-react'
5+
6+
interface ContactButtonProps {
7+
href: string
8+
children: React.ReactNode
9+
}
10+
11+
export function ContactButton({ href, children }: ContactButtonProps) {
12+
const [isHovered, setIsHovered] = useState(false)
13+
14+
return (
15+
<a
16+
href={href}
17+
target='_blank'
18+
rel='noopener noreferrer'
19+
onMouseEnter={() => setIsHovered(true)}
20+
onMouseLeave={() => setIsHovered(false)}
21+
style={{
22+
display: 'inline-flex',
23+
alignItems: 'center',
24+
gap: '7px',
25+
borderRadius: '5px',
26+
background: isHovered ? '#E0E0E0' : '#FFFFFF',
27+
borderWidth: '1px',
28+
borderStyle: 'solid',
29+
borderColor: isHovered ? '#E0E0E0' : '#FFFFFF',
30+
paddingTop: '5px',
31+
paddingBottom: '5px',
32+
paddingLeft: '9px',
33+
paddingRight: '9px',
34+
fontSize: '13.5px',
35+
fontWeight: 430,
36+
color: '#000000',
37+
textDecoration: 'none',
38+
transition: 'background 200ms, border-color 200ms',
39+
}}
40+
>
41+
{children}
42+
<span style={{ display: 'inline-flex' }}>
43+
{isHovered ? (
44+
<ArrowRight style={{ height: '16px', width: '16px' }} aria-hidden='true' />
45+
) : (
46+
<ChevronRight style={{ height: '16px', width: '16px' }} aria-hidden='true' />
47+
)}
48+
</span>
49+
</a>
50+
)
51+
}

apps/sim/tools/wikipedia/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const WIKIPEDIA_SEARCH_RESULT_OUTPUT: OutputProperty = {
141141
/**
142142
* Output definition for page content objects
143143
*/
144-
const WIKIPEDIA_PAGE_CONTENT_OUTPUT_PROPERTIES = {
144+
export const WIKIPEDIA_PAGE_CONTENT_OUTPUT_PROPERTIES = {
145145
title: { type: 'string', description: 'Page title' },
146146
pageid: { type: 'number', description: 'Wikipedia page ID' },
147147
html: { type: 'string', description: 'Full HTML content of the page' },

0 commit comments

Comments
 (0)