Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 0e369fd

Browse files
d-e-v-eshDianaLease
authored andcommitted
feat(ui-markdown-editor): inline-code BG - #341
Signed-off-by: Devesh <[email protected]>
1 parent f9d2eb3 commit 0e369fd

File tree

1 file changed

+10
-1
lines changed
  • packages/ui-markdown-editor/src/components

1 file changed

+10
-1
lines changed

packages/ui-markdown-editor/src/components/Leaf.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3+
import styled from 'styled-components';
4+
5+
const Code = styled.code`
6+
color: black;
7+
border: 1px solid #D3D3D3;
8+
background: #ededeb;
9+
border-radius: 2.5px;
10+
padding: 0px 2px;
11+
`;
312

413
/* eslint no-param-reassign: 0 */
514
const Leaf = ({ attributes, children, leaf }) => {
@@ -8,7 +17,7 @@ const Leaf = ({ attributes, children, leaf }) => {
817
}
918

1019
if (leaf.code) {
11-
children = <code>{children}</code>;
20+
children = <Code>{children}</Code>;
1221
}
1322

1423
if (leaf.italic) {

0 commit comments

Comments
 (0)