mirror of
https://github.com/jaywcjlove/wxmp.git
synced 2026-01-12 00:08:50 +08:00
feat: add color palette.
This commit is contained in:
@@ -14,7 +14,7 @@ export const Warpper = styled.div`
|
||||
`;
|
||||
|
||||
export const Preview = (props: MarkdownPreviewProps) => {
|
||||
const { css } = useContext(Context);
|
||||
const html = markdownToHTML(props.source || '', css);
|
||||
const { css, preColor, previewTheme } = useContext(Context);
|
||||
const html = markdownToHTML(props.source || '', css, { preColor, previewTheme });
|
||||
return <Warpper contentEditable spellCheck={false} dangerouslySetInnerHTML={{ __html: html }} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user