Skip to content

Commit b20223c

Browse files
authored
Merge pull request #3675 from udecode/fix/color
Fix `DefaultLeaf` missing style attribute
2 parents 0bf7fcf + 9a897f2 commit b20223c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.changeset/big-snails-deny.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@udecode/plate-core': patch
3+
---
4+
5+
Fix `DefaultLeaf` missing style attribute

packages/core/src/react/components/DefaultLeaf.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ import React from 'react';
22

33
import type { PlateRenderLeafProps } from '../plugin/PlateRenderLeafProps';
44

5-
export function DefaultLeaf({ attributes, children }: PlateRenderLeafProps) {
6-
return <span {...attributes}>{children}</span>;
5+
export function DefaultLeaf({
6+
attributes,
7+
children,
8+
style,
9+
}: PlateRenderLeafProps & { style?: React.CSSProperties }) {
10+
return (
11+
<span {...attributes} style={style}>
12+
{children}
13+
</span>
14+
);
715
}

0 commit comments

Comments
 (0)