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:
7575 - label : Body
7676 name : body
7777 widget : markdown
78- hint : " *Main* __content__ __*goes*__ [here](example.com)."
78+ hint : " *Main* __content__ __*goes*__ [here](https:// example.com/ )."
7979 - name : faq
8080 label : FAQ
8181 folder : _faqs
Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React , { useCallback } from 'react' ;
22import ReactMarkdown from 'react-markdown' ;
33import gfm from 'remark-gfm' ;
44
55import useCursor from '@staticcms/core/lib/hooks/useCursor' ;
66import classNames from '@staticcms/core/lib/util/classNames.util' ;
77import { generateClassNames } from '@staticcms/core/lib/util/theming.util' ;
88
9- import type { FC } from 'react' ;
9+ import type { FC , MouseEvent } from 'react' ;
1010
1111import './Hint.css' ;
1212
@@ -40,6 +40,10 @@ const Hint: FC<HintProps> = ({
4040} ) => {
4141 const finalCursor = useCursor ( cursor , disabled ) ;
4242
43+ const handleOnClick = useCallback ( ( event : MouseEvent ) => {
44+ event . stopPropagation ( ) ;
45+ } , [ ] ) ;
46+
4347 return (
4448 < div
4549 data-testid = "hint"
@@ -53,6 +57,7 @@ const Hint: FC<HintProps> = ({
5357 variant === 'inline' && classes . inline ,
5458 className ,
5559 ) }
60+ onClick = { handleOnClick }
5661 >
5762 < ReactMarkdown
5863 remarkPlugins = { [ gfm ] }
You can’t perform that action at this time.
0 commit comments