mirror of
https://github.com/outline/outline.git
synced 2026-12-03 18:10:36 +03:00
fix: Letter icon incorrect in picker and sidebar (#9720)
This commit is contained in:
1 parent
df28641677
commit
b3e91a2acc
2 files changed
+5
-2
No files matched your search
@@ -182,9 +182,11 @@ function InnerDocumentLink(
|
||||
const can = policies.abilities(node.id);
|
||||
const icon = document?.icon || node.icon || node.emoji;
|
||||
const color = document?.color || node.color;
|
||||
const initial = (document?.title || node.title).slice(0, 1).toUpperCase();
|
||||
|
||||
const iconElement = React.useMemo(
|
||||
() => (icon ? <Icon value={icon} color={color} /> : undefined),
|
||||
() =>
|
||||
icon ? <Icon value={icon} color={color} initial={initial} /> : undefined,
|
||||
[icon, color]
|
||||
);
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ const DocumentTitle = React.forwardRef(function _DocumentTitle(
|
||||
);
|
||||
|
||||
const dir = ref.current?.getComputedDirection();
|
||||
|
||||
const initial = title.slice(0, 1).toUpperCase();
|
||||
const fallbackIcon = icon ? (
|
||||
<Icon value={icon} color={color} size={40} />
|
||||
) : null;
|
||||
@@ -258,6 +258,7 @@ const DocumentTitle = React.forwardRef(function _DocumentTitle(
|
||||
<StyledIconPicker
|
||||
icon={icon ?? null}
|
||||
color={color}
|
||||
initial={initial}
|
||||
size={40}
|
||||
popoverPosition="bottom-start"
|
||||
onChange={handleIconChange}
|
||||
|
||||
Reference in new issue
Block a user