types.ts raw
1 import { ComponentProps } from 'react'
2 import type { Components as RmComponents } from 'react-markdown'
3 import type { Data, Node } from 'unist'
4
5 // Extend the Components interface to include your custom component
6 export interface Components extends RmComponents {
7 nostr: React.ComponentType<{
8 rawText: string
9 bech32Id?: string
10 }>
11 }
12
13 export interface NostrNode extends Node {
14 type: 'nostr'
15 data: Data & {
16 hName: string
17 hProperties: ComponentProps<Components['nostr']>
18 }
19 }
20