diff --git a/native/components/spoiler.react.js b/native/markdown/markdown-spoiler.react.js rename from native/components/spoiler.react.js rename to native/markdown/markdown-spoiler.react.js --- a/native/components/spoiler.react.js +++ b/native/markdown/markdown-spoiler.react.js @@ -7,12 +7,12 @@ import { useStyles } from '../themes/colors'; -type SpoilerProps = { +type MarkdownSpoilerProps = { +text: ReactElement, +children?: React.Node, }; -function Spoiler(props: SpoilerProps): React.Node { +function MarkdownSpoiler(props: MarkdownSpoilerProps): React.Node { const [isRevealed, setIsRevealed] = React.useState(false); const styles = useStyles(unboundStyles); const { text } = props; @@ -42,4 +42,4 @@ }, }; -export default Spoiler; +export default MarkdownSpoiler; diff --git a/native/markdown/rules.react.js b/native/markdown/rules.react.js --- a/native/markdown/rules.react.js +++ b/native/markdown/rules.react.js @@ -9,10 +9,10 @@ import { relativeMemberInfoSelectorForMembersOfThread } from 'lib/selectors/user-selectors'; import * as SharedMarkdown from 'lib/shared/markdown'; import type { RelativeMemberInfo } from 'lib/types/thread-types'; -import Spoiler from 'native/components/spoiler.react'; import { useSelector } from '../redux/redux-utils'; import MarkdownLink from './markdown-link.react'; +import MarkdownSpoiler from './markdown-spoiler.react'; import { getMarkdownStyles } from './styles'; export type MarkdownRules = { @@ -199,7 +199,9 @@ node: SharedMarkdown.SingleASTNode, output: SharedMarkdown.Output, state: SharedMarkdown.State, - ) => , + ) => ( + + ), }, inlineCode: { ...SimpleMarkdown.defaultRules.inlineCode,