This repository was archived by the owner on Sep 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/components/common/field Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ collections:
75
75
- label : Body
76
76
name : body
77
77
widget : markdown
78
- hint : " *Main* __content__ __*goes*__ [here](example.com)."
78
+ hint : " *Main* __content__ __*goes*__ [here](https:// example.com/ )."
79
79
- name : faq
80
80
label : FAQ
81
81
folder : _faqs
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { useCallback } from 'react' ;
2
2
import ReactMarkdown from 'react-markdown' ;
3
3
import gfm from 'remark-gfm' ;
4
4
5
5
import useCursor from '@staticcms/core/lib/hooks/useCursor' ;
6
6
import classNames from '@staticcms/core/lib/util/classNames.util' ;
7
7
import { generateClassNames } from '@staticcms/core/lib/util/theming.util' ;
8
8
9
- import type { FC } from 'react' ;
9
+ import type { FC , MouseEvent } from 'react' ;
10
10
11
11
import './Hint.css' ;
12
12
@@ -40,6 +40,10 @@ const Hint: FC<HintProps> = ({
40
40
} ) => {
41
41
const finalCursor = useCursor ( cursor , disabled ) ;
42
42
43
+ const handleOnClick = useCallback ( ( event : MouseEvent ) => {
44
+ event . stopPropagation ( ) ;
45
+ } , [ ] ) ;
46
+
43
47
return (
44
48
< div
45
49
data-testid = "hint"
@@ -53,6 +57,7 @@ const Hint: FC<HintProps> = ({
53
57
variant === 'inline' && classes . inline ,
54
58
className ,
55
59
) }
60
+ onClick = { handleOnClick }
56
61
>
57
62
< ReactMarkdown
58
63
remarkPlugins = { [ gfm ] }
You can’t perform that action at this time.
0 commit comments