Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneFreeman committed Nov 7, 2023
2 parents d10e754 + d83e1f9 commit f903bf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/dev-test/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ collections:
- label: Body
name: body
widget: markdown
hint: '*Main* __content__ __*goes*__ [here](example.com).'
hint: "*Main* __content__ __*goes*__ [here](https://example.com/)."
- name: faq
label: FAQ
folder: _faqs
Expand Down
9 changes: 7 additions & 2 deletions packages/core/src/components/common/field/Hint.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import React, { useCallback } from 'react';
import ReactMarkdown from 'react-markdown';
import gfm from 'remark-gfm';

import useCursor from '@staticcms/core/lib/hooks/useCursor';
import classNames from '@staticcms/core/lib/util/classNames.util';
import { generateClassNames } from '@staticcms/core/lib/util/theming.util';

import type { FC } from 'react';
import type { FC, MouseEvent } from 'react';

import './Hint.css';

Expand Down Expand Up @@ -37,6 +37,10 @@ const Hint: FC<HintProps> = ({
}) => {
const finalCursor = useCursor(cursor, disabled);

const handleOnClick = useCallback((event: MouseEvent) => {
event.stopPropagation();
}, []);

return (
<div
data-testid="hint"
Expand All @@ -48,6 +52,7 @@ const Hint: FC<HintProps> = ({
variant === 'inline' && classes.inline,
className,
)}
onClick={handleOnClick}
>
<ReactMarkdown
remarkPlugins={[gfm]}
Expand Down

0 comments on commit f903bf5

Please sign in to comment.