Skip to content

Commit

Permalink
refactor: use default code styling for inline code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-C committed Nov 8, 2024
1 parent 6f65621 commit 3ae0408
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/components/SlateEditor/plugins/mark/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
*/

import { Editor } from "slate";
import styled from "@emotion/styled";

const StyledCode = styled.code`
display: inline;
padding: 0;
margin: 0;
background-color: #eee;
`;

export const markRenderer = (editor: Editor) => {
const { renderLeaf } = editor;
Expand All @@ -36,7 +28,7 @@ export const markRenderer = (editor: Editor) => {
ret = <u {...attributes}>{ret || children}</u>;
}
if (leaf.code) {
ret = <StyledCode {...attributes}>{ret || children}</StyledCode>;
ret = <code {...attributes}>{ret || children}</code>;
}
if (ret) {
return ret;
Expand Down

0 comments on commit 3ae0408

Please sign in to comment.